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
78240308
Commit
78240308
authored
Jun 25, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Treat the top-level message window as a desktop window.
parent
1abbe0df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
18 deletions
+52
-18
dialog.c
dlls/user32/dialog.c
+1
-1
focus.c
dlls/user32/focus.c
+1
-0
message.c
dlls/user32/message.c
+5
-5
win.c
dlls/user32/win.c
+42
-11
win.h
dlls/user32/win.h
+2
-0
winpos.c
dlls/user32/winpos.c
+1
-1
No files found.
dlls/user32/dialog.c
View file @
78240308
...
...
@@ -1085,7 +1085,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
if
(
CallMsgFilterW
(
msg
,
MSGF_DIALOGBOX
))
return
TRUE
;
hwndDlg
=
WIN_GetFullHandle
(
hwndDlg
);
if
(
hwndDlg
==
GetDesktopWindow
(
))
return
FALSE
;
if
(
is_desktop_window
(
hwndDlg
))
return
FALSE
;
if
((
hwndDlg
!=
msg
->
hwnd
)
&&
!
IsChild
(
hwndDlg
,
msg
->
hwnd
))
return
FALSE
;
hwndDlg
=
DIALOG_FindMsgDestination
(
hwndDlg
);
...
...
dlls/user32/focus.c
View file @
78240308
...
...
@@ -264,6 +264,7 @@ HWND WINAPI SetFocus( HWND hwnd )
if
(
style
&
(
WS_MINIMIZE
|
WS_DISABLED
))
return
0
;
parent
=
GetAncestor
(
hwndTop
,
GA_PARENT
);
if
(
!
parent
||
parent
==
GetDesktopWindow
())
break
;
if
(
parent
==
get_hwnd_message_parent
())
return
0
;
hwndTop
=
parent
;
}
...
...
dlls/user32/message.c
View file @
78240308
...
...
@@ -1281,21 +1281,21 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR
case
WM_WINE_DESTROYWINDOW
:
return
WIN_DestroyWindow
(
hwnd
);
case
WM_WINE_SETWINDOWPOS
:
if
(
hwnd
==
GetDesktopWindow
(
))
return
0
;
if
(
is_desktop_window
(
hwnd
))
return
0
;
return
USER_SetWindowPos
(
(
WINDOWPOS
*
)
lparam
);
case
WM_WINE_SHOWWINDOW
:
if
(
hwnd
==
GetDesktopWindow
(
))
return
0
;
if
(
is_desktop_window
(
hwnd
))
return
0
;
return
ShowWindow
(
hwnd
,
wparam
);
case
WM_WINE_SETPARENT
:
if
(
hwnd
==
GetDesktopWindow
(
))
return
0
;
if
(
is_desktop_window
(
hwnd
))
return
0
;
return
(
LRESULT
)
SetParent
(
hwnd
,
(
HWND
)
wparam
);
case
WM_WINE_SETWINDOWLONG
:
return
WIN_SetWindowLong
(
hwnd
,
(
short
)
LOWORD
(
wparam
),
HIWORD
(
wparam
),
lparam
,
TRUE
);
case
WM_WINE_ENABLEWINDOW
:
if
(
hwnd
==
GetDesktopWindow
(
))
return
0
;
if
(
is_desktop_window
(
hwnd
))
return
0
;
return
EnableWindow
(
hwnd
,
wparam
);
case
WM_WINE_SETACTIVEWINDOW
:
if
(
hwnd
==
GetDesktopWindow
(
))
return
0
;
if
(
is_desktop_window
(
hwnd
))
return
0
;
return
(
LRESULT
)
SetActiveWindow
(
(
HWND
)
wparam
);
case
WM_WINE_KEYBOARD_LL_HOOK
:
case
WM_WINE_MOUSE_LL_HOOK
:
...
...
dlls/user32/win.c
View file @
78240308
...
...
@@ -362,7 +362,7 @@ static void get_server_window_text( HWND hwnd, LPWSTR text, INT count )
*
* Return the parent for HWND_MESSAGE windows.
*/
static
HWND
get_hwnd_message_parent
(
void
)
HWND
get_hwnd_message_parent
(
void
)
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
...
...
@@ -371,6 +371,28 @@ static HWND get_hwnd_message_parent(void)
}
/*******************************************************************
* is_desktop_window
*
* Check if window is the desktop or the HWND_MESSAGE top parent.
*/
BOOL
is_desktop_window
(
HWND
hwnd
)
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
if
(
!
hwnd
)
return
FALSE
;
if
(
hwnd
==
thread_info
->
top_window
)
return
TRUE
;
if
(
hwnd
==
thread_info
->
msg_window
)
return
TRUE
;
if
(
!
HIWORD
(
hwnd
)
||
HIWORD
(
hwnd
)
==
0xffff
)
{
if
(
LOWORD
(
thread_info
->
top_window
)
==
LOWORD
(
hwnd
))
return
TRUE
;
if
(
LOWORD
(
thread_info
->
msg_window
)
==
LOWORD
(
hwnd
))
return
TRUE
;
}
return
FALSE
;
}
/***********************************************************************
* WIN_GetPtr
*
...
...
@@ -393,11 +415,7 @@ WND *WIN_GetPtr( HWND hwnd )
return
ptr
;
ptr
=
NULL
;
}
else
if
(
index
==
USER_HANDLE_TO_INDEX
(
GetDesktopWindow
()))
{
if
(
hwnd
==
GetDesktopWindow
()
||
!
HIWORD
(
hwnd
)
||
HIWORD
(
hwnd
)
==
0xffff
)
ptr
=
WND_DESKTOP
;
else
ptr
=
NULL
;
}
else
if
(
is_desktop_window
(
hwnd
))
ptr
=
WND_DESKTOP
;
else
ptr
=
WND_OTHER_PROCESS
;
USER_Unlock
();
return
ptr
;
...
...
@@ -454,7 +472,11 @@ HWND WIN_Handle32( HWND16 hwnd16 )
if
(
!
(
ptr
=
WIN_GetPtr
(
hwnd
)))
return
hwnd
;
if
(
ptr
==
WND_DESKTOP
)
return
GetDesktopWindow
();
if
(
ptr
==
WND_DESKTOP
)
{
if
(
LOWORD
(
hwnd
)
==
LOWORD
(
GetDesktopWindow
()))
return
GetDesktopWindow
();
else
return
get_hwnd_message_parent
();
}
if
(
ptr
!=
WND_OTHER_PROCESS
)
{
...
...
@@ -569,8 +591,16 @@ BOOL WIN_GetRectangles( HWND hwnd, RECT *rectWindow, RECT *rectClient )
{
RECT
rect
;
rect
.
left
=
rect
.
top
=
0
;
rect
.
right
=
GetSystemMetrics
(
SM_CXSCREEN
);
rect
.
bottom
=
GetSystemMetrics
(
SM_CYSCREEN
);
if
(
hwnd
==
get_hwnd_message_parent
())
{
rect
.
right
=
100
;
rect
.
bottom
=
100
;
}
else
{
rect
.
right
=
GetSystemMetrics
(
SM_CXSCREEN
);
rect
.
bottom
=
GetSystemMetrics
(
SM_CYSCREEN
);
}
if
(
rectWindow
)
*
rectWindow
=
rect
;
if
(
rectClient
)
*
rectClient
=
rect
;
}
...
...
@@ -1431,7 +1461,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
{
BOOL
is_child
;
if
(
!
(
hwnd
=
WIN_IsCurrentThread
(
hwnd
))
||
(
hwnd
==
GetDesktopWindow
()
))
if
(
!
(
hwnd
=
WIN_IsCurrentThread
(
hwnd
))
||
is_desktop_window
(
hwnd
))
{
SetLastError
(
ERROR_ACCESS_DENIED
);
return
FALSE
;
...
...
@@ -2609,7 +2639,8 @@ HWND WINAPI GetAncestor( HWND hwnd, UINT type )
break
;
case
GA_ROOTOWNER
:
if
((
ret
=
WIN_GetFullHandle
(
hwnd
))
==
GetDesktopWindow
())
return
0
;
if
(
is_desktop_window
(
hwnd
))
return
0
;
ret
=
WIN_GetFullHandle
(
hwnd
);
for
(;;)
{
HWND
parent
=
GetParent
(
ret
);
...
...
dlls/user32/win.h
View file @
78240308
...
...
@@ -76,6 +76,8 @@ typedef struct tagWND
#define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0080
/* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
/* Window functions */
extern
HWND
get_hwnd_message_parent
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_desktop_window
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
WND
*
WIN_GetPtr
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
HWND
WIN_Handle32
(
HWND16
hwnd16
)
DECLSPEC_HIDDEN
;
extern
HWND
WIN_IsCurrentProcess
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/winpos.c
View file @
78240308
...
...
@@ -2100,7 +2100,7 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
hdwp
,
hwnd
,
hwndAfter
,
x
,
y
,
cx
,
cy
,
flags
);
hwnd
=
WIN_GetFullHandle
(
hwnd
);
if
(
hwnd
==
GetDesktopWindow
(
))
return
0
;
if
(
is_desktop_window
(
hwnd
))
return
0
;
if
(
!
(
pDWP
=
USER_HEAP_LIN_ADDR
(
hdwp
)))
return
0
;
...
...
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