After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 330067 - devilspie does not do "geometry" correctly
devilspie does not do "geometry" correctly
Status: RESOLVED FIXED
Product: devilspie
Classification: Other
Component: general
0.16
Other All
: Normal normal
: ---
Assigned To: Devilspie Maintainers
Devilspie Maintainers
: 344424 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-02-06 00:43 UTC by Ed Kademan
Modified: 2006-06-09 17:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to actions.c to handle negative offsets (744 bytes, patch)
2006-04-26 21:19 UTC, Mildred
needs-work Details | Review
second patch for negative offsets (1008 bytes, patch)
2006-05-26 13:48 UTC, Vincent Ho
none Details | Review

Description Ed Kademan 2006-02-06 00:43:46 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.
Comment 1 Michal Jaegermann 2006-02-13 03:47:22 UTC
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.
Comment 2 Didier M. 2006-03-31 11:12:31 UTC
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).
Comment 3 Mildred 2006-04-26 21:19:28 UTC
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 :)
Comment 4 Ross Burton 2006-05-01 11:13:17 UTC
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!
Comment 5 Vincent Ho 2006-05-26 13:48:59 UTC
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.
Comment 6 Ross Burton 2006-06-04 18:08:35 UTC
Fixed in cvs, thanks!
Comment 7 Ross Burton 2006-06-09 17:29:39 UTC
*** Bug 344424 has been marked as a duplicate of this bug. ***