Ken Thomases : winemac: Don' t allow double-clicks in the content area to zoom the window.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 28 02:24:35 CDT 2014


Module: wine
Branch: master
Commit: d9ed0fb8e5028cb264c10f1e15c8bf2f3658ca41
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d9ed0fb8e5028cb264c10f1e15c8bf2f3658ca41

Author: Ken Thomases <ken at codeweavers.com>
Date:   Mon Oct 27 22:54:29 2014 -0500

winemac: Don't allow double-clicks in the content area to zoom the window.

On Yosemite, double-clicking a window's title bar zooms it.  (This is to
compensate for the fact that the zoom button has been replaced by a full-screen
button.)  Sometimes, double-clicking in the content area would count as double-
clicking in the title bar.

This is controlled, in part, by the -mouseDownCanMoveWindow method of the view
that was hit in the window.  The default implementation of that returns YES
for non-opaque views, as the views are in the Mac driver.  Overriding it to
return NO prevents the problem.

---

 dlls/winemac.drv/cocoa_window.m | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index 35222c1..b2238cb 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -374,6 +374,11 @@ static inline NSUInteger adjusted_modifiers_for_option_behavior(NSUInteger modif
         return [[self window] contentView] == self;
     }
 
+    - (BOOL) mouseDownCanMoveWindow
+    {
+        return NO;
+    }
+
     - (void) completeText:(NSString*)text
     {
         macdrv_event* event;




More information about the wine-cvs mailing list