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
30554d4e
Commit
30554d4e
authored
Nov 16, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Check structure size in GetGUIThreadInfo.
parent
b8d0c0dc
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
0 deletions
+27
-0
focus.c
dlls/user32/focus.c
+1
-0
message.c
dlls/user32/message.c
+7
-0
painting.c
dlls/user32/painting.c
+1
-0
win.c
dlls/user32/tests/win.c
+16
-0
win.c
dlls/user32/win.c
+1
-0
event.c
dlls/winex11.drv/event.c
+1
-0
No files found.
dlls/user32/focus.c
View file @
30554d4e
...
...
@@ -160,6 +160,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
{
GUITHREADINFO
info
;
info
.
cbSize
=
sizeof
(
info
);
GetGUIThreadInfo
(
GetCurrentThreadId
(),
&
info
);
/* Do not change focus if the window is no more active */
if
(
hwnd
==
info
.
hwndActive
)
...
...
dlls/user32/message.c
View file @
30554d4e
...
...
@@ -2359,6 +2359,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
/* find the window to dispatch this mouse message to */
info
.
cbSize
=
sizeof
(
info
);
GetGUIThreadInfo
(
GetCurrentThreadId
(),
&
info
);
if
(
info
.
hwndCapture
)
{
...
...
@@ -4235,6 +4236,12 @@ BOOL WINAPI GetGUIThreadInfo( DWORD id, GUITHREADINFO *info )
{
BOOL
ret
;
if
(
info
->
cbSize
!=
sizeof
(
*
info
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
SERVER_START_REQ
(
get_thread_input
)
{
req
->
tid
=
id
;
...
...
dlls/user32/painting.c
View file @
30554d4e
...
...
@@ -801,6 +801,7 @@ static HWND fix_caret(HWND hWnd, const RECT *scroll_rect, INT dx, INT dy,
RECT
rect
,
mapped_rcCaret
;
BOOL
hide_caret
=
FALSE
;
info
.
cbSize
=
sizeof
(
info
);
if
(
!
GetGUIThreadInfo
(
GetCurrentThreadId
(),
&
info
))
return
0
;
if
(
!
info
.
hwndCaret
)
return
0
;
...
...
dlls/user32/tests/win.c
View file @
30554d4e
...
...
@@ -611,6 +611,22 @@ static DWORD CALLBACK enum_thread( void *arg )
BOOL
ret
;
MSG
msg
;
if
(
pGetGUIThreadInfo
)
{
GUITHREADINFO
info
;
info
.
cbSize
=
sizeof
(
info
);
ret
=
pGetGUIThreadInfo
(
GetCurrentThreadId
(),
&
info
);
ok
(
ret
||
broken
(
!
ret
),
/* win9x */
"GetGUIThreadInfo failed without message queue
\n
"
);
SetLastError
(
0xdeadbeef
);
info
.
cbSize
=
sizeof
(
info
)
+
1
;
ret
=
pGetGUIThreadInfo
(
GetCurrentThreadId
(),
&
info
);
ok
(
!
ret
,
"GetGUIThreadInfo succeeded with wrong size
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
broken
(
GetLastError
()
==
0xdeadbeef
),
/* win9x */
"wrong error %u
\n
"
,
GetLastError
()
);
}
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
);
/* make sure we have a message queue */
count
=
0
;
...
...
dlls/user32/win.c
View file @
30554d4e
...
...
@@ -1587,6 +1587,7 @@ static void WIN_SendDestroyMsg( HWND hwnd )
{
GUITHREADINFO
info
;
info
.
cbSize
=
sizeof
(
info
);
if
(
GetGUIThreadInfo
(
GetCurrentThreadId
(),
&
info
))
{
if
(
hwnd
==
info
.
hwndCaret
)
DestroyCaret
();
...
...
dlls/winex11.drv/event.c
View file @
30554d4e
...
...
@@ -497,6 +497,7 @@ static void set_focus( Display *display, HWND hwnd, Time time )
TRACE
(
"setting foreground window to %p
\n
"
,
hwnd
);
SetForegroundWindow
(
hwnd
);
threadinfo
.
cbSize
=
sizeof
(
threadinfo
);
GetGUIThreadInfo
(
0
,
&
threadinfo
);
focus
=
threadinfo
.
hwndFocus
;
if
(
!
focus
)
focus
=
threadinfo
.
hwndActive
;
...
...
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