GNOME Bugzilla – Bug 330067
devilspie does not do "geometry" correctly
Last modified: 2006-06-09 17:29:39 UTC
Please describe the problem: Devilspie honors the shape portion of a geometry specification---that is, the width and height---but not the position. Steps to reproduce: Put a ds file with the following contents in the .devilspie directory and run devilspie. (if (is (application_name) "dclock") (begin (undecorate) (pin) (geometry "50x20+3-3"))) Then run dclock. Actual results: The dclock application appears as expected with no decorations, pinned to all the workspaces and with a 50x20 size. But it is not in the lower left corner. Expected results: Does this happen every time? yes Other information: Stopping devilspie and running dclock with an explicit geometry specification from the commandline works, but of course the resulting window has decorations and is not pinned to all the workspaces.
The same happens with 'center' function. It looks like that function 'XMoveResizeWindow()' and 'XMoveWindow()' are just ignored in the context. It is even worse. If a window was already started using '-geometry ...' then running devilspie with rules which match that window is sending it to the upper left corner regardless if there is some geometry specified in devilspie rules or not.
Additional info wrt comment #2 : the window only gets sent to the upper left corner when/if "(undecorate)" is specified. Unrelated : the geometry width/heigth unit seems to be pixels (whereis gnome-terminal WxH dimensions are specified in characters).
Created attachment 64351 [details] [review] patch to actions.c to handle negative offsets Hi, I just have the same problem ... with negative offsets. I made some little modifications to the file actions.c. I send the patch in attachement That's quite simple and works for me. i don't know if getting the screen width and height this way is the better way but at least it works :)
That screen code won't work with multiple screens per display. Instead get the WnckScreen from the WnckWindow in c->window, and use wnck_screen_get_width and _get_height. After that is fixed I'll commit it, thanks!
Created attachment 66283 [details] [review] second patch for negative offsets I hit this same problem trying to adjust Gaim chat windows to geometry "-0-0". I took Mildred's patch and adjusted it per your suggestions. Built a test Debian package with the patch; both positive and negative offsets seem to be working fine.
Fixed in cvs, thanks!
*** Bug 344424 has been marked as a duplicate of this bug. ***