Views:
1,164β
Votes: 2β
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1197504
Title:
What is the Window Title Bar height in Pixel?
ID:
/2019/12/20/What-is-the-Window-Title-Bar-height-in-Pixel_
Created:
December 20, 2019
Edited: June 12, 2020
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
From What causes the deviation in the wmctrl window move command
$ xprop | grep FRAME
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0
Whenever you get a windows position and move it to that same position it shouldnβt move on the screen but it does due to the height of the title bar. So in my case I would need to subtract 28 from the y-coordinate and move to that spot.
Improving performance
You will find the command takes about 10 seconds to run:
$ time xprop | grep FRAME
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0
real 0m9.989s
user 0m0.017s
sys 0m0.004s
This is extraordinary slow. To speed up the search pass a Window ID:
$ time xprop -id $(xdotool getactivewindow) | grep FRAME
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 28, 0
real 0m0.012s
user 0m0.011s
sys 0m0.003s
Now itβs only a hundredth of a second, faster than a blinking eye.