wxpython - Moving a window between workspaces/virtual desktops -


itemprop = "text">

I have a Linux-only wxPython application with wxFrame which acts as a menu / toolbar, this new window Can be opened from the toolbar itself are free.
Since users can transfer from any of these windows to any virtual workspace, I'm looking at a way to move Toolbar to the current workspace whenever the user activates the window. I've tried to use I Raise (), but in this way Toolbar also receives focus and I do not want it. Please note that I can not make the Toolbar sticky, because me every Not on workspace

Thank you!

(wxPython 2.8.1.1, Ubuntu 9.04)

Follow-up:

I checked the source code to see how it "workspace" N to the workspace en ". It uses it, so I'm trying to use it python. This is my code now:

  import gtk def move_to_workspace (frame, ws): gdkwin = gtk.gdk.window_lookup (Frame.GetHandle ()) win = gdkwin.get_user_data () while isinstance No (win, gtk.Window): # Find the original window object win = win.get_parent () win.window.property_change (gtk.gdk.atom_intern ("After Xprop this code is somewhat successful, It looks like "XProp" detects the change:  
  (before execution) $ xprop | Grep WM_DESKTOP _NET_WM_DESKTOP (cardinal) = 0 (after) $ xprop | Grep WM_DESKTOP _NET_WM_DESKTOP (CARDINAL) = 1  

But the problem is that the window is desired I have not come in the workspace: /

Should I use Pygtk instead of Python instead of Python? If this is the case, then I have a wxframe (or gtk.Window, or the related Xlib window). XID)

Follow-up 2:

The same xprop .. is used

  $ Xprop -id & lt; id & gt; -f_NET_WM_DESKTOP 32c -set _NET_WM_DESKTOP 1  

This detects _NET_WM_DESKTOP changed, but the window remains there: / However, I have Pay attention to Or

  • If I mapped the window on the "source" workspace, it disappears
  • So, maybe I should send some sort of "refresh" message to the window manager too ..?

    It is a bit old, but still .. to set window properties and send events After that, call the display.Display example of the flush method.


    Comments

    Popular posts from this blog

    oracle - The fastest way to check if some records in a database table? -

    php - multilevel menu with multilevel array -

    jQuery UI: Datepicker month format -