(?) wm.test - wm-geometry-2.1 in Ubuntu
ania.pawelczyk on Jul 03, 2008 @ 02:29AM UTC
Problem:
wm.test – wm-geometry-2.1 fails under Ubuntu
Question:
How to obtain Ubuntu’s left top edge of the screen?
Explenation:
I’ve encountered strange behavior of wm geometry x and x coordination in Ubuntu (8.04 Gnome)
== wm-geometry-2.1 setting values FAILED == Contents of test case:
wm geometry .t 150×150+50+50 update lappend result [wm geometry .t] wm geometry .t {} update lappend result [string equal [wm geometry .t] "150×150+50+50"]Result was:
150×150+55+74 0
-- Result should have been (exact matching):
150×150+50+50 0
As test wm-geometry-2.1 (wm.test) fails in this environment, I checked and for following code
>toplevel .t
>wm geometry .t 200×200+0+0
>wm geometry .t
it returns 200×200+5+24
In Ubuntu’s default settings GNOME Panel consists of 2 panels: top one and bottom one. Both height is 24 pixels and this is where 24 px come from, but those 5 of height are inexplicable.
-If I move panel to the left it sometimes reacts 200×200+5+24 (even after rebooting) and sometimes returns 200×200+30+24
-If I move the top panel on the right, wm geometry .t still shows the same results, but the widget itself moves up those 24px that panel took
screenshot: http://www.assembla.com/spaces/TkTests/documents/dFjqsKsoKr3Bdjab7jnrAJ/download/wmGeometryScreen1
-If I get back, the results now increase to 200×200+5+49
screenshot: http://www.assembla.com/spaces/TkTests/documents/a7tbJ4soOr3yHuab7jnrAJ/download/wmGeometryScreen2
To make it worse, it always (no matter what I do)
> wm geometry .t 150×150-0-0
> wm geometry .t
>150×150—5—24
On the live CD with default settings
>toplevel .t
>wm geometry .t 200×200+0+0
>wm geometry .t
it returns 200×200+5+49
As this happens only on Ubuntu, should this be taken care in the test?
I tried to find out if any parameter corresponds somehow with the results (so that I could count the tktest result), but with no effect.
Replies
-
Anonymous on Jul 07, 2008 @ 08:43AM UTC
The inconsistent results are probably caused (in part) by the window decorations (title bar and border). Seems that they are sometimes included in the "wm geometry" result, and sometimes not. You can also compare "winfo geometry" and "wm geometry".