GNOME Bugzilla – Bug 154030
Vertical maximization is buggy in Xinerama
Last modified: 2004-12-22 21:47:04 UTC
1. Start a xinerama session with screen 1 (crt with 1600x1200) to the left of screen 0 (LCD with 1400x1050) 2. Add a top panel 3. Add a keybinding for vertical maximization 4. Vertically maximize a window on screen 0 Expected results: - Window maximizes vertically to the height of screen minus panels Actual results: - Window maximizes vertically AND maximizes completely. Pressing the unmaximize-button achieves the desired vertical maximization
It appears that check_maximize_to_work_area (window.c) is the culprit. I'm guessing that the behaviour is buggy on a vertically aligned xinerama setup with horizontal maximization on the lower screen. Attaching patch.
Created attachment 32055 [details] [review] Vertical maximization on xinerama bugfix As I am new to Metacity code, I don't fully understand the original check_maximize_to_work_area. The comments, however, state that a window that is maximized both vertically and horizontally should be completely maximized. This patch achieves that.
Really the problem here is that the vertical maximize doesn't really "maximize" it, it just resizes the window. To do this we need to separate out the maximize_vert and maximize_horiz states in the UI, so that they're not linked together, and make those keybindings toggle those states rather than actually resizing the window. Its a bit tricky to manage, but probably doable. Note we'd also have to figure out how it should work if you vertically maximize an window then try to move it left/right or resize it horizontally. A stopgap solution would be to use the get_workarea_for_xinerama function. Also, unless/until we change it to be a true maximize toggle, we can't ignore the size increment hint in the maximize vert/horiz function, since we're just doing a resize. *** This bug has been marked as a duplicate of 113601 ***