[Xquartz-changes] [jeremyhu/quartz-wm] 863ba6: Fix possible error during make install

Ken Thomases ken at codeweavers.com
Thu Feb 16 23:19:44 PST 2012


  Branch: refs/heads/quartz-wm-1.2-branch
  Home:   https://github.com/jeremyhu/quartz-wm
  Commit: 863ba679f7c95669e1d3c1d090c65a8b2ae73fc6
      https://github.com/jeremyhu/quartz-wm/commit/863ba679f7c95669e1d3c1d090c65a8b2ae73fc6
  Author: Jeremy Huddleston <jeremyhu at apple.com>
  Date:   2012-02-16 (Thu, 16 Feb 2012)

  Changed paths:
    M lib/Makefile.am

  Log Message:
  -----------
  Fix possible error during make install

Fix an issue with 'make install' if we are installing over a
previous install.

Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
(cherry picked from commit 9848c838aecdcdfe118b03c40fe211724449c5a5)


  Commit: b840e41e7cdfad6123483397145470711e43a0b4
      https://github.com/jeremyhu/quartz-wm/commit/b840e41e7cdfad6123483397145470711e43a0b4
  Author: Ken Thomases <ken at codeweavers.com>
  Date:   2012-02-16 (Thu, 16 Feb 2012)

  Changed paths:
    M src/x-window.m

  Log Message:
  -----------
  Fix "un-zooming" on certain windows which weren't reacting properly

Regression from: 682660f84093f06f32515b1d01b649daa2e58fb1

The prior code sometimes tested for a maximized window by comparing the
current frame with

	[_screen zoomed_rect:X11RectOrigin(_current_frame)]

but other times compared it with

	[self validate_frame_rect:[_screen zoomed_rect:X11RectOrigin(_current_frame)]]

The latter is more correct and takes WM size hints, like the resize
increments, into account.  My code standardized on the former, though.  The
old code was wrong in some cases, mine is wrong in all cases.

The long story:

My understanding is that quartz-wm's behavior is based on Cocoa's.
NSWindow's -isZoomed method tests if the window's frame equals the zoomed
frame computed for the window.  So, any change of the window's frame
potentially changes whether it is considered zoomed or not.  Quartz-wm
behaves similarly.

There are two aspects of what "is considered zoomed" might mean.  There's the
method in the above patch, -is_maximized, in the quartz-wm code.  That
compares the current frame (well, "intended" frame) with a computed zoomed
frame.  Then, there's the question of whether quartz-wm puts the
_NET_WM_STATE_MAXIMIZED_{HORZ,VERT} atoms in the window's _NET_WM_STATE
property.

My changes were intended to get the latter part to match the former.

However, I also inadvertently made the computed zoomed frame not meet the
is-it-zoomed test for windows with resize increments and, probably, a maximum
size smaller than the screen.  Quartz-wm would compute one zoomed frame for
the window, set the frame to that, and then subsequently compare against a
possibly different frame to determine if the window was zoomed.

Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
(cherry picked from commit 24818cfbc7e345bd357e553a1082fd4530284412)


Compare: https://github.com/jeremyhu/quartz-wm/compare/360e10f...b840e41


More information about the Xquartz-changes mailing list