GNOME Bugzilla – Bug 329650
Applet window is misplaced first time opened
Last modified: 2006-02-05 12:29:26 UTC
1. killall -HUP gnome-dictionary-applet 2. Click on 'reload' when the panel asks whether to reload the applet 3. Click on dictionary icon of the applet After these steps, the window will appear at the wrong location. Click the dictionary icon of the applet two more times (one to hide it, one to show it again) and it'll be in the right location. I'm running CVS HEAD as of today.
I can't reproduce this bug with HEAD. the window might take a fraction of a second to redraw itself (I'm trying to remove this), but it appears aligned to the toggle button.
I can't duplicate either if my applet is on the top panel. But I can duplicate when it's on the bottom panel. It appears to be due to setting minimum size hints (again?) _after_ having the window shown, at least according to a metacity debug log I created. I'll attach a screenshot in just a minute as well as portions of that verbose debugging log.
Created attachment 58720 [details] Screenshot showing the window appearing offscreen It's worth noting that there is no Metacity bug here as I first suspected (allowing a window to be partially offscreen on initial map) because the applet window is a dock (though I didn't notice this until after filing; see bug 329932).
Created attachment 58722 [details] Partial verbose debugging log from metacity showing what's happening This log, especially at the end, shows that the window is setting a minimum size constraint _after_ being positioned and additionally has a NorthWestGravity setting meaning that it the top left corner needs to remain fixed when resizing to meet the minimum size constraints. This, combined with the fact that DOCK windows aren't constrained to remain onscreen causes the window to go under the panel and even a little bit offscreen.
Oh, it's also worth noting that there's some ugly flashing on for the first window as well. It is initally shown at location 0,0 before it is moved elsewhere (as can be seen in the log attached in comment 4 and which I looked for after seeing that). It seems really odd that configure requests and minimum size hints are being sent after the window has been shown; it'd make more sense to do it before to prevent this flashing.
okay, I think I've got this fixed by overriding the show closure; also, I'm setting the window gravity so that the window manager should pick it up correctly this time. fixes are in HEAD. please, re-open the bug if the logs show that I should do something else.