[winswitch] A Hopefully Quick Question About Xpra.
Antoine Martin
antoine at nagafix.co.uk
Thu Nov 5 13:47:20 GMT 2015
> I added the following two functions to XpraServer and then started the
> thread
> on class initialization.
>
> def schedule_pictures_thread(self):
> while True:
> self.idle_add(self.get_pictures)
> time.sleep(1)
FYI: you don't really need a new thread here, just use:
self.timeout_add(1000, self.get_pictures)
and return True at the end of get_pictures.
> What I would like to do is keep the window mapped until its destruction.
> This
> way, I can take accurate screenshots of running programs regardless of if I
> am attached to them. I believe I have found that calling the setup() window
> method when it is initially created by the wm in _manage_client creates the
> pixmap. Now, I would like to change a bit of code that will a) map a window
> as soon as it is created by the wm and b) only unmap windows on
> destruction. I am looking for some hints on where I should be making these
> changes.
The setup() method of the window model class should be called from
do_manage_client already.
(see the ugly call_setup invoked from the instance __init__ method)
The unmap case is a little bit more difficult, you could try commenting
it out in _process_unmap_window and see what breaks...
Cheers
Antoine
More information about the shifter-users
mailing list