Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1d10457a
Commit
1d10457a
authored
Jun 19, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Jun 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Also activate if a window is ordered front shortly after tray icon clicked.
... in addition to if one is focused.
parent
92a67d42
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
5 deletions
+16
-5
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+7
-3
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-0
macdrv_cocoa.h
dlls/winemac.drv/macdrv_cocoa.h
+1
-1
window.c
dlls/winemac.drv/window.c
+7
-1
No files found.
dlls/winemac.drv/cocoa_window.m
View file @
1d10457a
...
...
@@ -761,7 +761,7 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
/* Returns whether or not the window was ordered in, which depends on if
its frame intersects any screen. */
-
(
BOOL
)
orderBelow
:
(
WineWindow
*
)
prev
orAbove
:
(
WineWindow
*
)
next
-
(
BOOL
)
orderBelow
:
(
WineWindow
*
)
prev
orAbove
:
(
WineWindow
*
)
next
activate
:
(
BOOL
)
activate
{
WineApplicationController
*
controller
=
[
WineApplicationController
sharedController
];
BOOL
on_screen
=
frame_intersects_screens
([
self
frame
],
[
NSScreen
screens
]);
...
...
@@ -772,6 +772,9 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
[
controller
transformProcessToForeground
];
if
(
activate
)
[
NSApp
activateIgnoringOtherApps
:
YES
];
NSDisableScreenUpdates
();
if
(
latentParentWindow
)
...
...
@@ -1627,14 +1630,15 @@ void macdrv_set_cocoa_window_title(macdrv_window w, const unsigned short* title,
* (i.e. if its frame intersects with a screen). Otherwise, false.
*/
int
macdrv_order_cocoa_window
(
macdrv_window
w
,
macdrv_window
prev
,
macdrv_window
next
)
macdrv_window
next
,
int
activate
)
{
WineWindow
*
window
=
(
WineWindow
*
)
w
;
__block
BOOL
on_screen
;
OnMainThread
(
^
{
on_screen
=
[
window
orderBelow
:(
WineWindow
*
)
prev
orAbove
:(
WineWindow
*
)
next
];
orAbove
:(
WineWindow
*
)
next
activate
:
activate
];
});
return
on_screen
;
...
...
dlls/winemac.drv/macdrv.h
View file @
1d10457a
...
...
@@ -162,6 +162,7 @@ extern void macdrv_window_did_unminimize(HWND hwnd) DECLSPEC_HIDDEN;
extern
void
macdrv_mouse_button
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_mouse_moved
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_mouse_scroll
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_release_capture
(
HWND
hwnd
,
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_compute_keyboard_layout
(
struct
macdrv_thread_data
*
thread_data
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_keyboard_changed
(
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
...
...
dlls/winemac.drv/macdrv_cocoa.h
View file @
1d10457a
...
...
@@ -350,7 +350,7 @@ extern void macdrv_set_cocoa_window_state(macdrv_window w,
extern
void
macdrv_set_cocoa_window_title
(
macdrv_window
w
,
const
UniChar
*
title
,
size_t
length
)
DECLSPEC_HIDDEN
;
extern
int
macdrv_order_cocoa_window
(
macdrv_window
w
,
macdrv_window
prev
,
macdrv_window
next
)
DECLSPEC_HIDDEN
;
macdrv_window
next
,
int
activate
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_hide_cocoa_window
(
macdrv_window
w
)
DECLSPEC_HIDDEN
;
extern
int
macdrv_set_cocoa_window_frame
(
macdrv_window
w
,
const
CGRect
*
new_frame
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_get_cocoa_window_frame
(
macdrv_window
w
,
CGRect
*
out_frame
)
DECLSPEC_HIDDEN
;
...
...
dlls/winemac.drv/window.c
View file @
1d10457a
...
...
@@ -587,6 +587,7 @@ static void show_window(struct macdrv_win_data *data)
HWND
next
=
NULL
;
macdrv_window
prev_window
=
NULL
;
macdrv_window
next_window
=
NULL
;
BOOL
activate
=
FALSE
;
/* find window that this one must be after */
prev
=
GetWindow
(
data
->
hwnd
,
GW_HWNDPREV
);
...
...
@@ -605,12 +606,16 @@ static void show_window(struct macdrv_win_data *data)
TRACE
(
"win %p/%p below %p/%p above %p/%p
\n
"
,
data
->
hwnd
,
data
->
cocoa_window
,
prev
,
prev_window
,
next
,
next_window
);
data
->
on_screen
=
macdrv_order_cocoa_window
(
data
->
cocoa_window
,
prev_window
,
next_window
);
if
(
!
prev_window
)
activate
=
activate_on_focus_time
&&
(
GetTickCount
()
-
activate_on_focus_time
<
2000
);
data
->
on_screen
=
macdrv_order_cocoa_window
(
data
->
cocoa_window
,
prev_window
,
next_window
,
activate
);
if
(
data
->
on_screen
)
{
HWND
hwndFocus
=
GetFocus
();
if
(
hwndFocus
&&
(
data
->
hwnd
==
hwndFocus
||
IsChild
(
data
->
hwnd
,
hwndFocus
)))
macdrv_SetFocus
(
hwndFocus
);
if
(
activate
)
activate_on_focus_time
=
0
;
}
}
...
...
@@ -861,6 +866,7 @@ void CDECL macdrv_SetFocus(HWND hwnd)
BOOL
activate
=
activate_on_focus_time
&&
(
GetTickCount
()
-
activate_on_focus_time
<
2000
);
/* Set Mac focus */
macdrv_give_cocoa_window_focus
(
data
->
cocoa_window
,
activate
);
activate_on_focus_time
=
0
;
}
release_win_data
(
data
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment