baverman / orcsome

Scripting extension for NETWM compliant window managers
MIT License
28 stars 3 forks source link

geometry functions now works with top window #8

Open paul-axe opened 8 years ago

paul-axe commented 8 years ago

Now it resolves top-level window (with wm decorations) to obtain/change geometry. Not sure if cycle condition is reliable, but can't find any bugs here

paul-axe commented 8 years ago

Btw, i think to forget to add to commit one thing. Not sure how it should work, but moveresize must not to consider viewport size, because get_window_geometry doesn't. Now if we'll try to get window coordinates and then use them in moveresize, window will moved. The diff is

-        o_x, o_y, _, _ = tuple(self.get_workarea())
-        params = flags, x+o_x, y+o_y, max(1, w), max(1, h)
+        params = flags, x, y, max(1, w), max(1, h)