Reserving screen space / preventing overlap

Hello List,

I am trying to figure out the porting from PyGtk&Gtk+2 to PyGI&Gtk+3.
In this effort I would like to port the formula for preventing overlap
on a top level window (i.e. reserving screen space for that window).

The PyGtk code was:
self.window.window.property_change("_NET_WM_STRUT", "CARDINAL", 32,
gtk.gdk.PROP_MODE_REPLACE, [0,0,24,0])

So far I found a non-working equivalent for PyGI:
"_NET_WM_STRUT", "CARDINAL", 32, Gdk.PropMode.REPLACE, [0,0,24,0], 4)

First: I found out however that "_NET_WM_STRUT", "CARDINAL" should be
of Gdk.Atom type rather than str. Gdk.atom_intern() should help
creating that atom (see
but Python warns no such method is known in the Gdk module and the
Gdk.Atom has no appropriate method.

Second: I am not sure about the last argument in the
Gdk.property_change(). For now i put 4, not knowing whether that will
work, because I  understood I should tell the method how many elements
of size are contained in the preceding argument (the doc's not clear
to me).

Could anyone help on that?

By the way the PyGI documentation is very much lacking, I'm struggling
on each line to find out the syntax. Is there any plan to document
this better? I have started a modest blog where I plan to put all my
findings as I go, if you want to participate let me know,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]