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
1babe5b2
Commit
1babe5b2
authored
Dec 24, 1998
by
Ulrich Weigand
Committed by
Alexandre Julliard
Dec 24, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Queue handling adapted to new queue routines.
parent
89b93bf2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
20 deletions
+25
-20
clipboard.c
windows/clipboard.c
+10
-8
hook.c
windows/hook.c
+9
-8
timer.c
windows/timer.c
+3
-2
winpos.c
windows/winpos.c
+3
-2
No files found.
windows/clipboard.c
View file @
1babe5b2
...
...
@@ -16,6 +16,8 @@
#include "win.h"
#include "heap.h"
#include "message.h"
#include "queue.h"
#include "task.h"
#include "clipboard.h"
#include "xmalloc.h"
#include "debug.h"
...
...
@@ -183,7 +185,7 @@ BOOL32 WINAPI OpenClipboard32( HWND32 hWnd )
if
(
!
hqClipLock
)
{
hqClipLock
=
Get
TaskQueue
(
0
);
hqClipLock
=
Get
FastQueue
(
);
hWndClipWindow
=
hWnd
;
bCBHasChanged
=
FALSE
;
bRet
=
TRUE
;
...
...
@@ -211,7 +213,7 @@ BOOL32 WINAPI CloseClipboard32(void)
{
TRACE
(
clipboard
,
"!
\n
"
);
if
(
hqClipLock
==
Get
TaskQueue
(
0
))
if
(
hqClipLock
==
Get
FastQueue
(
))
{
hWndClipWindow
=
0
;
...
...
@@ -241,7 +243,7 @@ BOOL32 WINAPI EmptyClipboard32(void)
TRACE
(
clipboard
,
"(void)
\n
"
);
if
(
hqClipLock
!=
Get
TaskQueue
(
0
))
return
FALSE
;
if
(
hqClipLock
!=
Get
FastQueue
(
))
return
FALSE
;
/* destroy private objects */
...
...
@@ -298,7 +300,7 @@ HANDLE16 WINAPI SetClipboardData16( UINT16 wFormat, HANDLE16 hData )
* adding new data).
*/
if
(
(
hqClipLock
!=
Get
TaskQueue
(
0
))
||
!
lpFormat
||
if
(
(
hqClipLock
!=
Get
FastQueue
(
))
||
!
lpFormat
||
(
!
hData
&&
(
!
hWndClipOwner
||
(
hWndClipOwner
!=
hWndClipWindow
)))
)
return
0
;
CLIPBOARD_GetDriver
()
->
pSetClipboardData
(
wFormat
);
...
...
@@ -346,7 +348,7 @@ HANDLE32 WINAPI SetClipboardData32( UINT32 wFormat, HANDLE32 hData )
* adding new data).
*/
if
(
(
hqClipLock
!=
Get
TaskQueue
(
0
))
||
!
lpFormat
||
if
(
(
hqClipLock
!=
Get
FastQueue
(
))
||
!
lpFormat
||
(
!
hData
&&
(
!
hWndClipOwner
||
(
hWndClipOwner
!=
hWndClipWindow
)))
)
return
0
;
CLIPBOARD_GetDriver
()
->
pSetClipboardData
(
wFormat
);
...
...
@@ -459,7 +461,7 @@ HANDLE16 WINAPI GetClipboardData16( UINT16 wFormat )
LPCLIPFORMAT
lpRender
=
ClipFormats
;
LPCLIPFORMAT
lpUpdate
=
NULL
;
if
(
hqClipLock
!=
Get
TaskQueue
(
0
))
return
0
;
if
(
hqClipLock
!=
Get
FastQueue
(
))
return
0
;
TRACE
(
clipboard
,
"(%04X)
\n
"
,
wFormat
);
...
...
@@ -535,7 +537,7 @@ HANDLE32 WINAPI GetClipboardData32( UINT32 wFormat )
LPCLIPFORMAT
lpRender
=
ClipFormats
;
LPCLIPFORMAT
lpUpdate
=
NULL
;
if
(
hqClipLock
!=
Get
TaskQueue
(
0
))
return
0
;
if
(
hqClipLock
!=
Get
FastQueue
(
))
return
0
;
TRACE
(
clipboard
,
"(%08X)
\n
"
,
wFormat
);
...
...
@@ -656,7 +658,7 @@ UINT32 WINAPI EnumClipboardFormats32( UINT32 wFormat )
TRACE
(
clipboard
,
"(%04X)
\n
"
,
wFormat
);
if
(
hqClipLock
!=
Get
TaskQueue
(
0
)
)
return
0
;
if
(
hqClipLock
!=
Get
FastQueue
(
)
)
return
0
;
if
(
(
!
wFormat
||
wFormat
==
CF_TEXT
||
wFormat
==
CF_OEMTEXT
)
)
CLIPBOARD_GetDriver
()
->
pRequestSelection
();
...
...
windows/hook.c
View file @
1babe5b2
...
...
@@ -17,6 +17,7 @@
#include "windows.h"
#include "hook.h"
#include "queue.h"
#include "task.h"
#include "user.h"
#include "heap.h"
#include "struct32.h"
...
...
@@ -976,7 +977,7 @@ static LRESULT HOOK_CallHook( HANDLE16 hook, INT32 fromtype, INT32 code,
/* Now call it */
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
GetT
ask
Queue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
GetT
hread
Queue
(
0
)
)))
return
0
;
prevHook
=
queue
->
hCurHook
;
queue
->
hCurHook
=
hook
;
data
->
flags
|=
HOOK_INUSE
;
...
...
@@ -1025,7 +1026,7 @@ HOOKPROC16 HOOK_GetProc16( HHOOK hhook )
*/
BOOL32
HOOK_IsHooked
(
INT16
id
)
{
return
HOOK_GetHook
(
id
,
GetT
ask
Queue
(
0
)
)
!=
0
;
return
HOOK_GetHook
(
id
,
GetT
hread
Queue
(
0
)
)
!=
0
;
}
...
...
@@ -1039,7 +1040,7 @@ LRESULT HOOK_CallHooks16( INT16 id, INT16 code, WPARAM16 wParam,
{
HANDLE16
hook
;
if
(
!
(
hook
=
HOOK_GetHook
(
id
,
GetT
ask
Queue
(
0
)
)))
return
0
;
if
(
!
(
hook
=
HOOK_GetHook
(
id
,
GetT
hread
Queue
(
0
)
)))
return
0
;
if
(
!
(
hook
=
HOOK_FindValidHook
(
hook
)))
return
0
;
return
HOOK_CallHook
(
hook
,
HOOK_WIN16
,
code
,
wParam
,
lParam
);
}
...
...
@@ -1054,7 +1055,7 @@ LRESULT HOOK_CallHooks32A( INT32 id, INT32 code, WPARAM32 wParam,
{
HANDLE16
hook
;
if
(
!
(
hook
=
HOOK_GetHook
(
id
,
GetT
ask
Queue
(
0
)
)))
return
0
;
if
(
!
(
hook
=
HOOK_GetHook
(
id
,
GetT
hread
Queue
(
0
)
)))
return
0
;
if
(
!
(
hook
=
HOOK_FindValidHook
(
hook
)))
return
0
;
return
HOOK_CallHook
(
hook
,
HOOK_WIN32A
,
code
,
wParam
,
lParam
);
}
...
...
@@ -1069,7 +1070,7 @@ LRESULT HOOK_CallHooks32W( INT32 id, INT32 code, WPARAM32 wParam,
{
HANDLE16
hook
;
if
(
!
(
hook
=
HOOK_GetHook
(
id
,
GetT
ask
Queue
(
0
)
)))
return
0
;
if
(
!
(
hook
=
HOOK_GetHook
(
id
,
GetT
hread
Queue
(
0
)
)))
return
0
;
if
(
!
(
hook
=
HOOK_FindValidHook
(
hook
)))
return
0
;
return
HOOK_CallHook
(
hook
,
HOOK_WIN32W
,
code
,
wParam
,
lParam
);
...
...
@@ -1268,7 +1269,7 @@ HHOOK WINAPI SetWindowsHookEx32W( INT32 id, HOOKPROC32 proc, HINSTANCE32 hInst,
*/
BOOL16
WINAPI
UnhookWindowsHook16
(
INT16
id
,
HOOKPROC16
proc
)
{
HANDLE16
hook
=
HOOK_GetHook
(
id
,
GetTask
Queue
(
0
)
);
HANDLE16
hook
=
HOOK_GetHook
(
id
,
GetThread
Queue
(
0
)
);
TRACE
(
hook
,
"%d %08lx
\n
"
,
id
,
(
DWORD
)
proc
);
...
...
@@ -1288,7 +1289,7 @@ BOOL16 WINAPI UnhookWindowsHook16( INT16 id, HOOKPROC16 proc )
*/
BOOL32
WINAPI
UnhookWindowsHook32
(
INT32
id
,
HOOKPROC32
proc
)
{
HANDLE16
hook
=
HOOK_GetHook
(
id
,
GetTask
Queue
(
0
)
);
HANDLE16
hook
=
HOOK_GetHook
(
id
,
GetThread
Queue
(
0
)
);
TRACE
(
hook
,
"%d %08lx
\n
"
,
id
,
(
DWORD
)
proc
);
...
...
@@ -1375,7 +1376,7 @@ LRESULT WINAPI DefHookProc16( INT16 code, WPARAM16 wParam, LPARAM lParam,
* current hook value from the task queue to find the next hook. */
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
GetT
ask
Queue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
GetT
hread
Queue
(
0
)
)))
return
0
;
return
CallNextHookEx16
(
queue
->
hCurHook
,
code
,
wParam
,
lParam
);
}
...
...
windows/timer.c
View file @
1babe5b2
...
...
@@ -6,6 +6,7 @@
#include "windows.h"
#include "queue.h"
#include "task.h"
#include "winproc.h"
#include "debug.h"
...
...
@@ -254,8 +255,8 @@ static UINT32 TIMER_SetTimer( HWND32 hwnd, UINT32 id, UINT32 timeout,
/* Add the timer */
pTimer
->
hwnd
=
hwnd
;
pTimer
->
hq
=
(
hwnd
)
?
GetT
askQueue
(
GetWindowTask16
(
hwnd
)
)
:
Get
TaskQueue
(
0
);
pTimer
->
hq
=
(
hwnd
)
?
GetT
hreadQueue
(
GetWindowThreadProcessId
(
hwnd
,
NULL
)
)
:
Get
FastQueue
(
);
pTimer
->
msg
=
sys
?
WM_SYSTIMER
:
WM_TIMER
;
pTimer
->
id
=
id
;
pTimer
->
timeout
=
timeout
;
...
...
windows/winpos.c
View file @
1babe5b2
...
...
@@ -15,6 +15,7 @@
#include "message.h"
#include "queue.h"
#include "options.h"
#include "task.h"
#include "winpos.h"
#include "dce.h"
#include "nonclient.h"
...
...
@@ -409,7 +410,7 @@ hittest:
if
(
!*
ppWnd
)
*
ppWnd
=
wndScope
;
/* Send the WM_NCHITTEST message (only if to the same task) */
if
((
*
ppWnd
)
->
hmemTaskQ
==
Get
TaskQueue
(
0
))
if
((
*
ppWnd
)
->
hmemTaskQ
==
Get
FastQueue
(
))
{
hittest
=
(
INT16
)
SendMessage16
(
(
*
ppWnd
)
->
hwndSelf
,
WM_NCHITTEST
,
0
,
MAKELONG
(
pt
.
x
,
pt
.
y
)
);
...
...
@@ -1449,7 +1450,7 @@ BOOL32 WINPOS_SetActiveWindow( HWND32 hWnd, BOOL32 fMouse, BOOL32 fChangeFocus)
/* paranoid checks */
if
(
hWnd
==
GetDesktopWindow32
()
||
hWnd
==
hwndActive
)
return
0
;
/* if (wndPtr && (Get
TaskQueue(0
) != wndPtr->hmemTaskQ))
/* if (wndPtr && (Get
FastQueue(
) != wndPtr->hmemTaskQ))
* return 0;
*/
wndPtr
=
WIN_FindWndPtr
(
hWnd
);
...
...
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