[winswitch] WinSwitch Development Question

Antoine Martin antoine at nagafix.co.uk
Thu Jun 6 12:40:01 BST 2013

Hi Mark,

On 06/06/2013 12:54 AM, mark doyle wrote:
> Antoine,
> I'm not writing this to address a bug issue, which seems to be the main
> point of the mailing list.
No, just a sign of my sloppy coding ;)

> But, I have a fairly basic question about
> modifying the UI of WinSwitch, but as I have just picked up Python and
> gtk in the past week, my working knowledge of the source code is
> somewhat limited. Essentially, what I am trying to do is modify the UI
> so that dragging an open application session window to the edge of the
> screen will send that application to another user. I feel like this
> would add a pretty neat feature, and avoids the hassle of going through
> drop down menus, clicking send, etc. Of course this approach is limited,
> but I'm only trying to get it to work on just using 1 server, and 2
> users, to send the application back and forth. 
We had already discussed a similar thing with synergy a while back (when
the software was called 'shifter'):
See also:

This may help in providing a better way of detecting movements to/past
the edge of the screen.

> Attached is an added class I made that so far detects the running
> application window and minimizes it when placed on the right-most 10% of
> the screen. (a proof of concept design choice). I am now trying to add
> the functionality of sending the application to another machine, but
> even after spending a tremendous amount time looking through the classes
> and trying a couple of things, I am still not sure what I need to import
> to get access to the sending functions/server/session variables of the
> winswitch application instance.
Sorry about that. Winswitch was one of my first ever project in python,
the coding style isn't great and MVC sometimes hides the flow behind
indirection layers.

> What seems to be a suitable solution would be if I could simulate a
> button press on the send button in the session information popup. (also
> attached):
> Any additional guidance or information on the problem would be greatly
> appreciated if you have the time!
What you want is just to send the "SEND_SESSION" message to the server,
which will fire: send_session_to_user.

To write a simple client, you may want to look at "client_cli.py"
You will need to know the UUID of the user you send the application to.
Let me know if you need more info, this shouldn't be too hard to get going.


> Thanks,
> Mark

More information about the shifter-users mailing list