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
76a0108c
Commit
76a0108c
authored
Jun 15, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use NtUserCallHwnd for NtUserSetForegroundWindow.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
389832e0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
focus.c
dlls/user32/focus.c
+1
-1
window.c
dlls/win32u/window.c
+3
-3
window.c
dlls/winemac.drv/window.c
+4
-4
event.c
dlls/winex11.drv/event.c
+3
-3
ntuser.h
include/ntuser.h
+6
-6
No files found.
dlls/user32/focus.c
View file @
76a0108c
...
...
@@ -37,7 +37,7 @@
*/
BOOL
WINAPI
SetForegroundWindow
(
HWND
hwnd
)
{
return
NtUserSetForegroundWindow
(
hwnd
,
FALSE
);
return
NtUserSetForegroundWindow
(
hwnd
);
}
...
...
dlls/win32u/window.c
View file @
76a0108c
...
...
@@ -5403,6 +5403,9 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code )
case
NtUserCallHwnd_IsWindowVisible
:
return
is_window_visible
(
hwnd
);
case
NtUserCallHwnd_SetForegroundWindow
:
return
set_foreground_window
(
hwnd
,
FALSE
);
default:
FIXME
(
"invalid code %u
\n
"
,
code
);
return
0
;
...
...
@@ -5489,9 +5492,6 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code )
case
NtUserCallHwndParam_ScreenToClient
:
return
screen_to_client
(
hwnd
,
(
POINT
*
)
param
);
case
NtUserCallHwndParam_SetForegroundWindow
:
return
set_foreground_window
(
hwnd
,
param
);
case
NtUserCallHwndParam_SetWindowContextHelpId
:
return
set_window_context_help_id
(
hwnd
,
param
);
...
...
dlls/winemac.drv/window.c
View file @
76a0108c
...
...
@@ -2350,7 +2350,7 @@ void macdrv_window_got_focus(HWND hwnd, const macdrv_event *event)
if
(
ma
!=
MA_NOACTIVATEANDEAT
&&
ma
!=
MA_NOACTIVATE
)
{
TRACE
(
"setting foreground window to %p
\n
"
,
hwnd
);
NtUserSetForegroundWindow
(
hwnd
,
FALSE
);
NtUserSetForegroundWindow
(
hwnd
);
return
;
}
}
...
...
@@ -2375,7 +2375,7 @@ void macdrv_window_lost_focus(HWND hwnd, const macdrv_event *event)
{
send_message
(
hwnd
,
WM_CANCELMODE
,
0
,
0
);
if
(
hwnd
==
NtUserGetForegroundWindow
())
NtUserSetForegroundWindow
(
NtUserGetDesktopWindow
()
,
FALSE
);
NtUserSetForegroundWindow
(
NtUserGetDesktopWindow
());
}
}
...
...
@@ -2404,7 +2404,7 @@ void macdrv_app_deactivated(void)
if
(
get_active_window
()
==
NtUserGetForegroundWindow
())
{
TRACE
(
"setting fg to desktop
\n
"
);
NtUserSetForegroundWindow
(
NtUserGetDesktopWindow
()
,
FALSE
);
NtUserSetForegroundWindow
(
NtUserGetDesktopWindow
());
}
}
...
...
@@ -2573,7 +2573,7 @@ void macdrv_window_drag_begin(HWND hwnd, const macdrv_event *event)
if
(
ma
!=
MA_NOACTIVATEANDEAT
&&
ma
!=
MA_NOACTIVATE
)
{
TRACE
(
"setting foreground window to %p
\n
"
,
hwnd
);
NtUserSetForegroundWindow
(
hwnd
,
FALSE
);
NtUserSetForegroundWindow
(
hwnd
);
}
}
...
...
dlls/winex11.drv/event.c
View file @
76a0108c
...
...
@@ -596,7 +596,7 @@ static void set_focus( Display *display, HWND hwnd, Time time )
GUITHREADINFO
threadinfo
;
TRACE
(
"setting foreground window to %p
\n
"
,
hwnd
);
NtUserSetForegroundWindow
(
hwnd
,
FALSE
);
NtUserSetForegroundWindow
(
hwnd
);
threadinfo
.
cbSize
=
sizeof
(
threadinfo
);
NtUserGetGUIThreadInfo
(
0
,
&
threadinfo
);
...
...
@@ -812,7 +812,7 @@ static BOOL X11DRV_FocusIn( HWND hwnd, XEvent *xev )
if
(
!
hwnd
)
hwnd
=
x11drv_thread_data
()
->
last_focus
;
if
(
hwnd
&&
can_activate_window
(
hwnd
))
set_focus
(
event
->
display
,
hwnd
,
CurrentTime
);
}
else
NtUserSetForegroundWindow
(
hwnd
,
FALSE
);
else
NtUserSetForegroundWindow
(
hwnd
);
return
TRUE
;
}
...
...
@@ -858,7 +858,7 @@ static void focus_out( Display *display , HWND hwnd )
if
(
hwnd
==
NtUserGetForegroundWindow
())
{
TRACE
(
"lost focus, setting fg to desktop
\n
"
);
NtUserSetForegroundWindow
(
NtUserGetDesktopWindow
()
,
FALSE
);
NtUserSetForegroundWindow
(
NtUserGetDesktopWindow
()
);
}
}
}
...
...
include/ntuser.h
View file @
76a0108c
...
...
@@ -983,6 +983,7 @@ enum
NtUserCallHwnd_IsWindowEnabled
,
NtUserCallHwnd_IsWindowUnicode
,
NtUserCallHwnd_IsWindowVisible
,
NtUserCallHwnd_SetForegroundWindow
,
};
static
inline
UINT
NtUserArrangeIconicWindows
(
HWND
parent
)
...
...
@@ -1041,6 +1042,11 @@ static inline BOOL NtUserIsWindowVisible( HWND hwnd )
return
NtUserCallHwnd
(
hwnd
,
NtUserCallHwnd_IsWindowVisible
);
}
static
inline
BOOL
NtUserSetForegroundWindow
(
HWND
hwnd
)
{
return
NtUserCallHwnd
(
hwnd
,
NtUserCallHwnd_SetForegroundWindow
);
}
/* NtUserCallHwndParam codes, not compatible with Windows */
enum
{
...
...
@@ -1067,7 +1073,6 @@ enum
NtUserCallHwndParam_MirrorRgn
,
NtUserCallHwndParam_MonitorFromWindow
,
NtUserCallHwndParam_ScreenToClient
,
NtUserCallHwndParam_SetForegroundWindow
,
NtUserCallHwndParam_SetWindowContextHelpId
,
NtUserCallHwndParam_SetWindowPixelFormat
,
NtUserCallHwndParam_ShowOwnedPopups
,
...
...
@@ -1207,11 +1212,6 @@ static inline BOOL NtUserScreenToClient( HWND hwnd, POINT *pt )
return
NtUserCallHwndParam
(
hwnd
,
(
UINT_PTR
)
pt
,
NtUserCallHwndParam_ScreenToClient
);
}
static
inline
BOOL
NtUserSetForegroundWindow
(
HWND
hwnd
,
BOOL
mouse
)
{
return
NtUserCallHwndParam
(
hwnd
,
mouse
,
NtUserCallHwndParam_SetForegroundWindow
);
}
static
inline
BOOL
NtUserSetWindowContextHelpId
(
HWND
hwnd
,
DWORD
id
)
{
return
NtUserCallHwndParam
(
hwnd
,
id
,
NtUserCallHwndParam_SetWindowContextHelpId
);
...
...
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