Menu

#151 Improved "-g workarea" for multi-display users

open
nobody
None
5
2012-11-29
2010-09-25
Anonymous
No

I like to have rdesktop fill my entire screen, and "-g workarea" just doesn't work if you have multiple displays with either differing resolutions or panel configurations.

I added "-g xrandr:OUTPUTNAME" which lets the user specify an XRandR output to fill with rdesktop. It queries XRandR for the screen location and resolution, and the current windows to subtract any panel windows from the area, and sizes and positions the rdesktop window appropriately. "-g xrandr" alone uses the first available output, if you have one screen and for some reason would like to use the calculated work area instead of the window manager hint. "-g xrandr" also implies "-D".

Example usage: rdesktop -g xrandr:VGA1 host

Caveats:

1) Doesn't yet handle changes to the work area while rdesktop is running (resolution changes, panels being added/removed/resized)
2) If the window manager overrides initial window positions, there's an ugly flicker as the window is mapped and then moved to the correct location

...I found about about mgmetzker's similar patch ( https://sourceforge.net/tracker/?func=detail&aid=3054346&group_id=24366&atid=381350 ) after writing mine, but since my patch also takes panel windows into account and seems to do less drastic things with X, I thought I'd upload it anyways.

I hope a patch created by "svn diff" against the trunk is all right.

Discussion