derf / feh

a fast and light image viewer
https://feh.finalrewind.org
Other
1.52k stars 159 forks source link

--scale-down: account for window decorations #72

Open derf opened 12 years ago

derf commented 12 years ago

Reported by mail: Apparently, --scale-down does not take window decorations into consideration when calculating the maximum window size. Gotta fix that.

antofthy commented 12 years ago

Window decortaions are available from individual window properities... _NET_FRAME_EXTENTS = left right top bottom

The Display working area, after taking into account panels is available from root window properity _NET_WORKAREA(CARDINAL) = { X,Y, WIDTH, HEIGHT },... repeated for each desktop the number of which is in _NET_NUMBER_OF_DESKTOPS and the current on in _NET_CURRENT_DESKTOP

these are standard Window Manager properities See http://standards.freedesktop.org/wm-spec/1.3/ar01s03.html

Still the user supplying the --scale-down size and position limits would be better and give more control :-)