Reputation: 871
I've been developing a dock-like program for linux, but the problem is that when I wanna run it on windows (xp/vista/7) these properties don't work:
self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK)
and
self.window.get_toplevel().show() # must call show() before property_change()
self.window.get_toplevel().window.property_change("_NET_WM_STRUT",
"CARDINAL", 32, gtk.gdk.PROP_MODE_REPLACE, [0, 0, 0, bottom_width])
it shows window borders(decorations) in addition to other dock properties and does not reserve its own space.
Simply, the lines above behave as if they're not there
What do I have to modify to make it work?
P.S. I have all binaries needed installed
Thx in advance :)
Upvotes: 2
Views: 596
Reputation: 4238
WINDOW_TYPE_HINT_DOCK
is simply not implemented in the Windows port (or rather, implemented to do nothing); you can confirm this in the GDK source. Theoretically—even in X—window managers are not required to do anything with the type hint (see EWMH spec). If you don't want the window decoration, simply remove it using gtk_window_set_decorated.
The answer to the second part of your question is similar, except this time it's very easy to confirm: it refers to NetWM, which is the same as EWMH and is an X11 thing. To implement struts in Windows, I'm pretty sure you'll have to do it on your own using the Win32 API. (I don't know how, but if you need the window handle it's in window.window.handle
.)
Upvotes: 1