Module: wine
Branch: master
Commit: f035cc73d0ae3f192f19109c1ef16cc536fcc5dc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f035cc73d0ae3f192f19109c1…
Author: Ken Thomases <ken(a)codeweavers.com>
Date: Mon Jun 17 23:36:01 2013 -0500
winemac: Don't give windows focus on click if the click was sent to Wine.
Only clicks on the title bar (outside the close or minimize buttons) or the
grow box give windows focus.
---
dlls/winemac.drv/cocoa_app.m | 6 +++++-
dlls/winemac.drv/cocoa_window.m | 16 ----------------
2 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index 2441b5d..20050bf 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -1426,6 +1426,7 @@ int macdrv_err_on;
{
WineWindow* window = (WineWindow*)[theEvent window];
NSEventType type = [theEvent type];
+ BOOL broughtWindowForward = FALSE;
if ([window isKindOfClass:[WineWindow class]] &&
!window.disabled && !window.noActivate &&
@@ -1433,7 +1434,8 @@ int macdrv_err_on;
(([theEvent modifierFlags] & (NSShiftKeyMask | NSControlKeyMask| NSAlternateKeyMask | NSCommandKeyMask)) != NSCommandKeyMask))
{
NSWindowButton windowButton;
- BOOL broughtWindowForward = TRUE;
+
+ broughtWindowForward = TRUE;
/* Any left-click on our window anyplace other than the close or
minimize buttons will bring it forward. */
@@ -1538,6 +1540,8 @@ int macdrv_err_on;
macdrv_release_event(event);
}
+ else if (broughtWindowForward && ![window isKeyWindow])
+ [self windowGotFocus:window];
}
// Since mouse button events deliver absolute cursor position, the
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index cf63b25..d926635 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -1181,8 +1181,6 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
- (void) sendEvent:(NSEvent*)event
{
- WineApplicationController* controller = [WineApplicationController sharedController];
-
/* NSWindow consumes certain key-down events as part of Cocoa's keyboard
interface control. For example, Control-Tab switches focus among
views. We want to bypass that feature, so directly route key-down
@@ -1190,21 +1188,7 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
if ([event type] == NSKeyDown)
[[self firstResponder] keyDown:event];
else
- {
- if ([event type] == NSLeftMouseDown &&
- (([event modifierFlags] & (NSShiftKeyMask | NSControlKeyMask| NSAlternateKeyMask | NSCommandKeyMask)) != NSCommandKeyMask))
- {
- /* Since our windows generally claim they can't be made key, clicks
- in their title bars are swallowed by the theme frame stuff. So,
- we hook directly into the event stream and assume that any click
- in the window will activate it, if Wine and the Win32 program
- accept. */
- if (![self isKeyWindow] && !self.disabled && !self.noActivate)
- [controller windowGotFocus:self];
- }
-
[super sendEvent:event];
- }
}
Module: wine
Branch: master
Commit: c14ff4bef0bd87000fea08eb69d29ddc6d874f5f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c14ff4bef0bd87000fea08eb6…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru>
Date: Tue Jun 18 16:34:27 2013 +0900
comctl32: Fix broken logic for retrieving default font properties.
---
dlls/comctl32/tab.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index bd75c88..85467ba 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -1899,7 +1899,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
if(infoPtr->dwStyle & TCS_VERTICAL) /* if we are vertical rotate the text and each character */
{
LOGFONTW logfont;
- HFONT hFont = 0;
+ HFONT hFont;
INT nEscapement = 900;
INT nOrientation = 900;
@@ -1911,10 +1911,8 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
/* to get a font with the escapement and orientation we are looking for, we need to */
/* call CreateFontIndirect, which requires us to set the values of the logfont we pass in */
- if (!GetObjectW((infoPtr->hFont) ?
- infoPtr->hFont : GetStockObject(DEFAULT_GUI_FONT),
- sizeof(LOGFONTW),&logfont))
- GetStockObject(DEFAULT_GUI_FONT);
+ if (!GetObjectW(infoPtr->hFont, sizeof(logfont), &logfont))
+ GetObjectW(GetStockObject(DEFAULT_GUI_FONT), sizeof(logfont), &logfont);
logfont.lfEscapement = nEscapement;
logfont.lfOrientation = nOrientation;