Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3ba583fd
Commit
3ba583fd
authored
Aug 26, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Introduce NtUserActivateOtherWindow.
And use it instead of WINPOS_ActivateOtherWindow.
parent
803a5f07
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
65 deletions
+11
-65
dialog.c
dlls/user32/dialog.c
+1
-1
win.h
dlls/user32/win.h
+0
-2
winpos.c
dlls/user32/winpos.c
+0
-62
window.c
dlls/win32u/window.c
+4
-0
ntuser.h
include/ntuser.h
+6
-0
No files found.
dlls/user32/dialog.c
View file @
3ba583fd
...
...
@@ -949,7 +949,7 @@ BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval )
if
(
owner
)
SetForegroundWindow
(
owner
);
else
WINPOS_
ActivateOtherWindow
(
hwnd
);
NtUser
ActivateOtherWindow
(
hwnd
);
}
/* unblock dialog loop */
...
...
dlls/user32/win.h
View file @
3ba583fd
...
...
@@ -35,8 +35,6 @@ extern HWND *WIN_ListChildren( HWND hwnd ) DECLSPEC_HIDDEN;
extern
void
MDI_CalcDefaultChildPos
(
HWND
hwndClient
,
INT
total
,
LPPOINT
lpPos
,
INT
delta
,
UINT
*
id
)
DECLSPEC_HIDDEN
;
extern
HDESK
open_winstation_desktop
(
HWINSTA
hwinsta
,
LPCWSTR
name
,
DWORD
flags
,
BOOL
inherit
,
ACCESS_MASK
access
)
DECLSPEC_HIDDEN
;
extern
void
WINPOS_ActivateOtherWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
static
inline
void
mirror_rect
(
const
RECT
*
window_rect
,
RECT
*
rect
)
{
int
width
=
window_rect
->
right
-
window_rect
->
left
;
...
...
dlls/user32/winpos.c
View file @
3ba583fd
...
...
@@ -242,68 +242,6 @@ BOOL WINAPI AnimateWindow(HWND hwnd, DWORD dwTime, DWORD dwFlags)
}
/*******************************************************************
* can_activate_window
*
* Check if we can activate the specified window.
*/
static
BOOL
can_activate_window
(
HWND
hwnd
)
{
LONG
style
;
if
(
!
hwnd
)
return
FALSE
;
style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
if
(
!
(
style
&
WS_VISIBLE
))
return
FALSE
;
if
((
style
&
(
WS_POPUP
|
WS_CHILD
))
==
WS_CHILD
)
return
FALSE
;
return
!
(
style
&
WS_DISABLED
);
}
/*******************************************************************
* WINPOS_ActivateOtherWindow
*
* Activates window other than pWnd.
*/
void
WINPOS_ActivateOtherWindow
(
HWND
hwnd
)
{
HWND
hwndTo
,
fg
;
if
((
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_POPUP
)
&&
(
hwndTo
=
GetWindow
(
hwnd
,
GW_OWNER
)))
{
hwndTo
=
NtUserGetAncestor
(
hwndTo
,
GA_ROOT
);
if
(
can_activate_window
(
hwndTo
))
goto
done
;
}
hwndTo
=
hwnd
;
for
(;;)
{
if
(
!
(
hwndTo
=
GetWindow
(
hwndTo
,
GW_HWNDNEXT
)))
break
;
if
(
can_activate_window
(
hwndTo
))
goto
done
;
}
hwndTo
=
GetTopWindow
(
0
);
for
(;;)
{
if
(
hwndTo
==
hwnd
)
{
hwndTo
=
0
;
break
;
}
if
(
can_activate_window
(
hwndTo
))
goto
done
;
if
(
!
(
hwndTo
=
GetWindow
(
hwndTo
,
GW_HWNDNEXT
)))
break
;
}
done:
fg
=
NtUserGetForegroundWindow
();
TRACE
(
"win = %p fg = %p
\n
"
,
hwndTo
,
fg
);
if
(
!
fg
||
(
hwnd
==
fg
))
{
if
(
SetForegroundWindow
(
hwndTo
))
return
;
}
if
(
!
NtUserSetActiveWindow
(
hwndTo
))
NtUserSetActiveWindow
(
0
);
}
/***********************************************************************
* BeginDeferWindowPos (USER32.@)
*/
...
...
dlls/win32u/window.c
View file @
3ba583fd
...
...
@@ -5364,6 +5364,10 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code )
{
switch
(
code
)
{
case
NtUserCallHwnd_ActivateOtherWindow
:
activate_other_window
(
hwnd
);
return
0
;
case
NtUserCallHwnd_ArrangeIconicWindows
:
return
arrange_iconic_windows
(
hwnd
);
...
...
include/ntuser.h
View file @
3ba583fd
...
...
@@ -1126,6 +1126,7 @@ static inline BOOL NtUserUnhookWindowsHook( INT id, HOOKPROC proc )
/* NtUserCallHwnd codes, not compatible with Windows */
enum
{
NtUserCallHwnd_ActivateOtherWindow
,
NtUserCallHwnd_ArrangeIconicWindows
,
NtUserCallHwnd_DrawMenuBar
,
NtUserCallHwnd_GetDefaultImeWindow
,
...
...
@@ -1149,6 +1150,11 @@ enum
NtUserIsCurrehtThreadWindow
,
};
static
inline
void
NtUserActivateOtherWindow
(
HWND
hwnd
)
{
NtUserCallHwnd
(
hwnd
,
NtUserCallHwnd_ActivateOtherWindow
);
}
static
inline
UINT
NtUserArrangeIconicWindows
(
HWND
parent
)
{
return
NtUserCallHwnd
(
parent
,
NtUserCallHwnd_ArrangeIconicWindows
);
...
...
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