Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
89b93bf2
Commit
89b93bf2
authored
26 years ago
by
Ulrich Weigand
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implemented stub for InitThreadInput.
Use GetThreadQueue/GetFastQueue instead of GetTaskQueue.
parent
ff35e1fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
if1632/user.spec
+1
-1
1 addition, 1 deletion
if1632/user.spec
include/queue.h
+2
-0
2 additions, 0 deletions
include/queue.h
include/task.h
+6
-0
6 additions, 0 deletions
include/task.h
windows/message.c
+11
-11
11 additions, 11 deletions
windows/message.c
windows/queue.c
+48
-11
48 additions, 11 deletions
windows/queue.c
with
68 additions
and
23 deletions
if1632/user.spec
+
1
−
1
View file @
89b93bf2
...
...
@@ -375,7 +375,7 @@ file user.exe
407 pascal16 CreateIcon(word word word word word ptr ptr) CreateIcon16
408 pascal16 CreateCursorIconIndirect(word ptr ptr ptr)
CreateCursorIconIndirect
409
stub
InitThreadInput
409
pascal16 InitThreadInput(word word)
InitThreadInput
410 pascal16 InsertMenu(word word word word segptr) InsertMenu16
411 pascal16 AppendMenu(word word word segptr) AppendMenu16
412 pascal16 RemoveMenu(word word word) RemoveMenu16
...
...
This diff is collapsed.
Click to expand it.
include/queue.h
+
2
−
0
View file @
89b93bf2
...
...
@@ -100,4 +100,6 @@ extern void QUEUE_FlushMessages(HQUEUE16);
extern
void
hardware_event
(
WORD
message
,
WORD
wParam
,
LONG
lParam
,
int
xPos
,
int
yPos
,
DWORD
time
,
DWORD
extraInfo
);
extern
HQUEUE16
WINAPI
InitThreadInput
(
WORD
unknown
,
WORD
flags
);
#endif
/* __WINE_QUEUE_H */
This diff is collapsed.
Click to expand it.
include/task.h
+
6
−
0
View file @
89b93bf2
...
...
@@ -155,4 +155,10 @@ extern HTASK16 TASK_GetNextTask( HTASK16 hTask );
extern
BOOL32
TASK_Reschedule
(
void
);
extern
void
TASK_InstallTHHook
(
THHOOK
*
pNewThook
);
extern
HQUEUE16
WINAPI
SetThreadQueue
(
DWORD
thread
,
HQUEUE16
hQueue
);
extern
HQUEUE16
WINAPI
GetThreadQueue
(
DWORD
thread
);
extern
VOID
WINAPI
SetFastQueue
(
DWORD
thread
,
HANDLE32
hQueue
);
extern
HANDLE32
WINAPI
GetFastQueue
(
void
);
#endif
/* __WINE_TASK_H */
This diff is collapsed.
Click to expand it.
windows/message.c
+
11
−
11
View file @
89b93bf2
...
...
@@ -102,7 +102,7 @@ static DWORD MSG_TranslateMouseMsg( HWND16 hTopWnd, DWORD filter,
INT16
ht
,
hittest
,
sendSC
=
0
;
UINT16
message
=
msg
->
message
;
POINT16
screen_pt
,
pt
;
HANDLE16
hQ
=
Get
T
as
k
Queue
(
0
);
HANDLE16
hQ
=
Get
F
as
t
Queue
();
MESSAGEQUEUE
*
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
hQ
);
BOOL32
eatMsg
=
FALSE
;
BOOL32
mouseClick
=
((
message
==
WM_LBUTTONDOWN
)
||
...
...
@@ -278,10 +278,10 @@ static DWORD MSG_TranslateKbdMsg( HWND16 hTopWnd, DWORD filter,
message
+=
WM_SYSKEYDOWN
-
WM_KEYDOWN
;
}
pWnd
=
WIN_FindWndPtr
(
hWnd
);
if
(
pWnd
&&
(
pWnd
->
hmemTaskQ
!=
Get
T
as
k
Queue
(
0
)))
if
(
pWnd
&&
(
pWnd
->
hmemTaskQ
!=
Get
F
as
t
Queue
()))
{
/* Not for the current task */
MESSAGEQUEUE
*
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
);
MESSAGEQUEUE
*
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
);
if
(
queue
)
QUEUE_ClearWakeBit
(
queue
,
QS_KEY
);
/* Wake up the other task */
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
pWnd
->
hmemTaskQ
);
...
...
@@ -596,7 +596,7 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
QSMCTRL
qCtrl
=
{
0
,
1
};
MESSAGEQUEUE
*
queue
,
*
destQ
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
0
;
if
(
!
(
destQ
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
hDestQueue
)))
return
0
;
if
(
IsTaskLocked
()
||
!
IsWindow32
(
hwnd
))
return
0
;
...
...
@@ -619,7 +619,7 @@ static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND16 hwnd, UINT16 msg,
queue
->
wParamHigh
=
HIWORD
(
wParam
);
queue
->
lParam
=
lParam
;
queue
->
hPrevSendingTask
=
destQ
->
hSendingTask
;
destQ
->
hSendingTask
=
Get
T
as
k
Queue
(
0
);
destQ
->
hSendingTask
=
Get
F
as
t
Queue
();
QUEUE_ClearWakeBit
(
queue
,
QS_SMPARAMSFREE
);
queue
->
flags
=
(
queue
->
flags
&
~
(
QUEUE_SM_WIN32
|
QUEUE_SM_UNICODE
))
|
flags
;
...
...
@@ -670,7 +670,7 @@ void WINAPI ReplyMessage16( LRESULT result )
MESSAGEQUEUE
*
senderQ
;
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
;
TRACE
(
msg
,
"ReplyMessage, queue %04x
\n
"
,
queue
->
self
);
...
...
@@ -736,7 +736,7 @@ static BOOL32 MSG_PeekMessage( LPMSG16 msg, HWND16 hwnd, WORD first, WORD last,
while
(
1
)
{
hQueue
=
Get
T
as
k
Queue
(
0
);
hQueue
=
Get
F
as
t
Queue
();
msgQueue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
hQueue
);
if
(
!
msgQueue
)
return
FALSE
;
msgQueue
->
changeBits
=
0
;
...
...
@@ -1222,7 +1222,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
SPY_EnterMessage
(
SPY_SENDMESSAGE16
,
hwnd
,
msg
,
wParam
,
lParam
);
if
(
wndPtr
->
hmemTaskQ
!=
Get
T
as
k
Queue
(
0
))
if
(
wndPtr
->
hmemTaskQ
!=
Get
F
as
t
Queue
())
ret
=
MSG_SendMessage
(
wndPtr
->
hmemTaskQ
,
hwnd
,
msg
,
wParam
,
lParam
,
0
);
else
...
...
@@ -1329,7 +1329,7 @@ LRESULT WINAPI SendMessage32A( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
SPY_EnterMessage
(
SPY_SENDMESSAGE32
,
hwnd
,
msg
,
wParam
,
lParam
);
if
(
wndPtr
->
hmemTaskQ
!=
Get
T
as
k
Queue
(
0
))
if
(
wndPtr
->
hmemTaskQ
!=
Get
F
as
t
Queue
())
ret
=
MSG_SendMessage
(
wndPtr
->
hmemTaskQ
,
hwnd
,
msg
,
wParam
,
lParam
,
QUEUE_SM_WIN32
);
else
...
...
@@ -1400,7 +1400,7 @@ LRESULT WINAPI SendMessage32W(
SPY_EnterMessage
(
SPY_SENDMESSAGE32
,
hwnd
,
msg
,
wParam
,
lParam
);
if
(
wndPtr
->
hmemTaskQ
!=
Get
T
as
k
Queue
(
0
))
if
(
wndPtr
->
hmemTaskQ
!=
Get
F
as
t
Queue
())
ret
=
MSG_SendMessage
(
wndPtr
->
hmemTaskQ
,
hwnd
,
msg
,
wParam
,
lParam
,
QUEUE_SM_WIN32
|
QUEUE_SM_UNICODE
);
else
...
...
@@ -1938,7 +1938,7 @@ BOOL32 WINAPI InSendMessage32(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
0
;
return
(
BOOL32
)
queue
->
InSendMessageHandle
;
}
...
...
This diff is collapsed.
Click to expand it.
windows/queue.c
+
48
−
11
View file @
89b93bf2
...
...
@@ -312,11 +312,11 @@ void QUEUE_WaitBits( WORD bits )
{
MESSAGEQUEUE
*
queue
;
TRACE
(
msg
,
"q %04x waiting for %04x
\n
"
,
Get
T
as
k
Queue
(
0
),
bits
);
TRACE
(
msg
,
"q %04x waiting for %04x
\n
"
,
Get
F
as
t
Queue
(),
bits
);
for
(;;)
{
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
;
if
(
queue
->
changeBits
&
bits
)
{
...
...
@@ -752,7 +752,7 @@ void WINAPI PostQuitMessage32( INT32 exitCode )
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
;
queue
->
wPostQMsg
=
TRUE
;
queue
->
wExitCode
=
(
WORD
)
exitCode
;
}
...
...
@@ -819,7 +819,7 @@ BOOL32 WINAPI SetMessageQueue32( INT32 size )
SIGNAL_MaskAsyncEvents
(
TRUE
);
/* Copy data and free the old message queue */
if
((
hQueue
=
GetT
ask
Queue
(
0
))
!=
0
)
if
((
hQueue
=
GetT
hread
Queue
(
0
))
!=
0
)
{
MESSAGEQUEUE
*
oldQ
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
hQueue
);
memcpy
(
&
queuePtr
->
wParamHigh
,
&
oldQ
->
wParamHigh
,
...
...
@@ -838,12 +838,25 @@ BOOL32 WINAPI SetMessageQueue32( INT32 size )
hFirstQueue
=
hNewQueue
;
if
(
!
queuePtr
->
next
)
pCursorQueue
=
queuePtr
;
SetT
ask
Queue
(
0
,
hNewQueue
);
SetT
hread
Queue
(
0
,
hNewQueue
);
SIGNAL_MaskAsyncEvents
(
FALSE
);
return
TRUE
;
}
/***********************************************************************
* InitThreadInput (USER.409)
*/
HQUEUE16
WINAPI
InitThreadInput
(
WORD
unknown
,
WORD
flags
)
{
HQUEUE16
hQueue
=
GetTaskQueue
(
0
);
FIXME
(
msg
,
"(%04X,%04X): should create thread-local message queue!
\n
"
,
unknown
,
flags
);
SetFastQueue
(
0
,
hQueue
);
return
hQueue
;
}
/***********************************************************************
* GetQueueStatus16 (USER.334)
...
...
@@ -853,7 +866,7 @@ DWORD WINAPI GetQueueStatus16( UINT16 flags )
MESSAGEQUEUE
*
queue
;
DWORD
ret
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
0
;
ret
=
MAKELONG
(
queue
->
changeBits
,
queue
->
wakeBits
);
queue
->
changeBits
=
0
;
return
ret
&
MAKELONG
(
flags
,
flags
);
...
...
@@ -867,7 +880,7 @@ DWORD WINAPI GetQueueStatus32( UINT32 flags )
MESSAGEQUEUE
*
queue
;
DWORD
ret
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
0
;
ret
=
MAKELONG
(
queue
->
changeBits
,
queue
->
wakeBits
);
queue
->
changeBits
=
0
;
return
ret
&
MAKELONG
(
flags
,
flags
);
...
...
@@ -900,11 +913,35 @@ BOOL32 WINAPI GetInputState32(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
FALSE
;
return
queue
->
wakeBits
&
(
QS_KEY
|
QS_MOUSEBUTTON
);
}
/***********************************************************************
* UserYield (USER.332)
*/
void
WINAPI
UserYield
(
void
)
{
TDB
*
pCurTask
=
(
TDB
*
)
GlobalLock16
(
GetCurrentTask
()
);
MESSAGEQUEUE
*
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
pCurTask
->
hQueue
);
if
(
!
THREAD_IsWin16
(
THREAD_Current
()
)
)
{
FIXME
(
task
,
"called for Win32 thread (%04x)!
\n
"
,
THREAD_Current
()
->
teb_sel
);
return
;
}
/* Handle sent messages */
while
(
queue
&&
(
queue
->
wakeBits
&
QS_SENDMESSAGE
))
QUEUE_ReceiveMessage
(
queue
);
OldYield
();
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
pCurTask
->
hQueue
);
while
(
queue
&&
(
queue
->
wakeBits
&
QS_SENDMESSAGE
))
QUEUE_ReceiveMessage
(
queue
);
}
/***********************************************************************
* GetMessagePos (USER.119) (USER32.272)
...
...
@@ -931,7 +968,7 @@ DWORD WINAPI GetMessagePos(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
0
;
return
queue
->
GetMessagePosVal
;
}
...
...
@@ -959,7 +996,7 @@ LONG WINAPI GetMessageTime(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
0
;
return
queue
->
GetMessageTimeVal
;
}
...
...
@@ -971,6 +1008,6 @@ LONG WINAPI GetMessageExtraInfo(void)
{
MESSAGEQUEUE
*
queue
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
T
as
k
Queue
(
0
)
)))
return
0
;
if
(
!
(
queue
=
(
MESSAGEQUEUE
*
)
GlobalLock16
(
Get
F
as
t
Queue
()
)))
return
0
;
return
queue
->
GetMessageExtraInfoVal
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment