Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-12-16 21:59:20

jt1122
Member
Registered: 2021-03-26
Posts: 245

understanding window placement (xprop/xdotool)

Hi,

I'm trying to understand how a window's position is determined.

II have an 1680x1050 root window.

There's a top panel which is 1680 X 30 (wxh). xprop on the top panel::

 xprop  -id 0x05c00002|grep -i frame 

gives:

 _NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0 

so it has no borders.

I have an app window whose size is 830x971.

Doing

 xdotool --search --onlyvisible --name app windowmove 0 0 

places the app window at x=10 y=68.

Checking the app's window:

 xprop  -id 0x05c00291|grep -i frame 

shows

 _NET_FRAME_EXTENTS(CARDINAL) = 5, 5, 19, 5  

which indicate the left, right, top, bottom app window frame widths.

As such  shouldn't the app window be placed  at 30 + 19 = 49 pixells from the screen top (panel height + app top frame height)?. Why is it placed at y = 68 ( 19 pixel difference )?.

The same goes for the lhs - shouldn't it be 5 pixel from the left & not 10?.

Thanks

Last edited by jt1122 (2022-12-17 12:13:49)

Offline

#2 2022-12-17 13:14:07

jt1122
Member
Registered: 2021-03-26
Posts: 245

Re: understanding window placement (xprop/xdotool)

Bumping.

Offline

#3 2022-12-17 15:02:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: understanding window placement (xprop/xdotool)

This is what I'm seeing repeating your test with similar dimensions:

$ xdotool search --onlyvisible --name thunar windowmove 0 0 
$ xprop | grep -i frame
_NET_FRAME_EXTENTS(CARDINAL) = 5, 5, 29, 5

I believe the 29 refers to the width of the panel (30 pixels starting at pixel 0).

Also, the thunar window is placed at x/y coordinates 0,30 (top corner of available space underneath the panel). I'm not too familiar with frame extents, but wanted to reply that my findings are somewhat different.

Edit: do you have any margins set?

Last edited by ToZ (2022-12-17 15:08:37)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2022-12-17 15:26:48

jt1122
Member
Registered: 2021-03-26
Posts: 245

Re: understanding window placement (xprop/xdotool)

Thanks.

Your results are similar to mine:: all the window border thicknesses are the same except the top border (29 vs. 30 in my case). As I understand the FRAME_EXTENTS reports the window border thickness, not the position.

So - if the top panel is 30 pixels deep shouldn't the app window be placed at y=30 pixels from the screen top?.

What are margins and where are they set?.

 xprop 

doesn't report any such attribute.

Regards

Offline

#5 2022-12-17 16:10:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: understanding window placement (xprop/xdotool)

jt1122 wrote:

What are margins and where are they set?.

 xprop 

doesn't report any such attribute.

Settings Manager > Workspaces > Margins. Mine are all set to 0. They are used by xfwm4 as guides on where to place windows - i.e. don't place windows in the margins.

Also note that CSD windows use _GTK_FRAME_EXTENTS (and Xfce supports this) - if you are using CSD window decorations (or gnome apps).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2022-12-17 16:34:10

jt1122
Member
Registered: 2021-03-26
Posts: 245

Re: understanding window placement (xprop/xdotool)

Thanks again.

Just checked - all the margins are set to 0.

The funny thing is that the app window is  flush against the top panel. So its geometry shows it's in y=68 but its top border touches the (top) panel lower border at y=30 pixels.

I've now disabled CSD (settings editor->xsettings->DialogsUseHeader ) but there's no change.

Any suggestions?.

Regards


Update: This issue only happens with non xfce apps. I've tested with mousepad & thunar & they are correctly placed at y=30. Chromium & Thunderbird have the abovementioned issue.

Last edited by jt1122 (2022-12-17 16:38:12)

Offline

#7 2022-12-17 17:03:31

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: understanding window placement (xprop/xdotool)

Just installed chromuim and thunderbird to test. Both work - however in thunderbird I needed to have "titlebar" enabled.

I've now disabled CSD (settings editor->xsettings->DialogsUseHeader ) but there's no change.

Make you sure you log out and back in again after to make that change for it to take effect.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2022-12-17 17:06:52

jt1122
Member
Registered: 2021-03-26
Posts: 245

Re: understanding window placement (xprop/xdotool)

Thanks, I;ll check later after logging out.

Out of curiosity - which browser & mail client are you using (prior to DLing chromium & TB)?.

CHeers

Offline

#9 2022-12-17 17:37:43

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: understanding window placement (xprop/xdotool)

jt1122 wrote:

Out of curiosity - which browser & mail client are you using (prior to DLing chromium & TB)?.

Firefox and firefox (web mail client).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2022-12-18 15:15:32

jt1122
Member
Registered: 2021-03-26
Posts: 245

Re: understanding window placement (xprop/xdotool)

Thanks.

I've ran chromium as

 GTK_CSD=0 chromium & 

but

 xdotool search --onlyvisible --class chrom windowmove 0 0 

still results in the window being placed at x=10, y=68, yet it's flush against the top panel. So there's a 38 pixels difference.

Are you getting chromium at x=0 y = 30?.

Offline

#11 2022-12-18 19:45:42

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: understanding window placement (xprop/xdotool)

jt1122 wrote:

Are you getting chromium at x=0 y = 30?.

Yes:

$ xdotool search --onlyvisible --name Chromium windowmove 0 0
$ xprop | grep -i frame
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0

chrom.png


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 8 queries executed - Memory usage: 566.55 KiB (Peak: 583.84 KiB) ]