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
3f03975f
Commit
3f03975f
authored
Apr 12, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added first/last message filters to MSG_InternalGetMessage to avoid
busy waits.
parent
85d30863
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
14 deletions
+18
-14
menu.c
controls/menu.c
+1
-1
message.h
include/message.h
+2
-2
dialog.c
windows/dialog.c
+1
-1
message.c
windows/message.c
+5
-5
nonclient.c
windows/nonclient.c
+9
-5
No files found.
controls/menu.c
View file @
3f03975f
...
...
@@ -2768,7 +2768,7 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
/* we have to keep the message in the queue until it's
* clear that menu loop is not over yet. */
if
(
!
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
msg
.
hwnd
,
mt
.
hOwnerWnd
,
if
(
!
MSG_InternalGetMessage
(
&
msg
,
msg
.
hwnd
,
mt
.
hOwnerWnd
,
0
,
0
,
MSGF_MENU
,
PM_NOREMOVE
,
!
enterIdleSent
,
&
enterIdleSent
))
break
;
/* check if EndMenu() tried to cancel us, by posting this message */
...
...
include/message.h
View file @
3f03975f
...
...
@@ -14,8 +14,8 @@
struct
tagMSG
;
/* message.c */
extern
BOOL
MSG_InternalGetMessage
(
int
type
,
struct
tagMSG
*
msg
,
HWND
hwnd
,
HWND
hwndOwner
,
WPARAM
code
,
extern
BOOL
MSG_InternalGetMessage
(
struct
tagMSG
*
msg
,
HWND
hwnd
,
HWND
hwndOwner
,
UINT
first
,
UINT
last
,
WPARAM
code
,
WORD
flags
,
BOOL
sendIdle
,
BOOL
*
idleSent
);
/* timer.c */
...
...
windows/dialog.c
View file @
3f03975f
...
...
@@ -1048,7 +1048,7 @@ static INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
if
(
!
(
dlgInfo
->
flags
&
DF_END
))
/* was EndDialog called in WM_INITDIALOG ? */
{
ShowWindow
(
hwnd
,
SW_SHOW
);
while
(
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
hwnd
,
ownerMsg
,
MSGF_DIALOGBOX
,
while
(
MSG_InternalGetMessage
(
&
msg
,
hwnd
,
ownerMsg
,
0
,
0
,
MSGF_DIALOGBOX
,
PM_REMOVE
,
!
(
wndPtr
->
dwStyle
&
DS_NOIDLEMSG
),
NULL
))
{
if
(
!
(
dlgInfo
->
flags
&
DF_END
)
&&
(
!
IsDialogMessageA
(
hwnd
,
&
msg
)))
...
...
windows/message.c
View file @
3f03975f
...
...
@@ -1316,14 +1316,14 @@ static BOOL MSG_PeekMessage( int type, LPMSG msg_out, HWND hwnd,
* 'hwnd' must be the handle of the dialog or menu window.
* 'code' is the message filter value (MSGF_??? codes).
*/
BOOL
MSG_InternalGetMessage
(
int
type
,
MSG
*
msg
,
HWND
hwnd
,
HWND
hwndOwner
,
BOOL
MSG_InternalGetMessage
(
MSG
*
msg
,
HWND
hwnd
,
HWND
hwndOwner
,
UINT
first
,
UINT
last
,
WPARAM
code
,
WORD
flags
,
BOOL
sendIdle
,
BOOL
*
idleSent
)
{
for
(;;)
{
if
(
sendIdle
)
{
if
(
!
MSG_PeekMessage
(
type
,
msg
,
0
,
0
,
0
,
flags
,
TRUE
))
if
(
!
MSG_PeekMessage
(
QMSG_WIN32A
,
msg
,
0
,
first
,
last
,
flags
,
TRUE
))
{
/* No message present -> send ENTERIDLE and wait */
if
(
IsWindow
(
hwndOwner
))
...
...
@@ -1334,11 +1334,11 @@ BOOL MSG_InternalGetMessage( int type, MSG *msg, HWND hwnd, HWND hwndOwner,
if
(
idleSent
!=
NULL
)
*
idleSent
=
TRUE
;
}
MSG_PeekMessage
(
type
,
msg
,
0
,
0
,
0
,
flags
,
FALSE
);
MSG_PeekMessage
(
QMSG_WIN32A
,
msg
,
0
,
first
,
last
,
flags
,
FALSE
);
}
}
else
/* Always wait for a message */
MSG_PeekMessage
(
type
,
msg
,
0
,
0
,
0
,
flags
,
FALSE
);
MSG_PeekMessage
(
QMSG_WIN32A
,
msg
,
0
,
first
,
last
,
flags
,
FALSE
);
/* Call message filters */
...
...
@@ -1360,7 +1360,7 @@ BOOL MSG_InternalGetMessage( int type, MSG *msg, HWND hwnd, HWND hwndOwner,
/* Message filtered -> remove it from the queue */
/* if it's still there. */
if
(
!
(
flags
&
PM_REMOVE
))
MSG_PeekMessage
(
type
,
msg
,
0
,
0
,
0
,
PM_REMOVE
,
TRUE
);
MSG_PeekMessage
(
QMSG_WIN32A
,
msg
,
0
,
first
,
last
,
PM_REMOVE
,
TRUE
);
continue
;
}
}
...
...
windows/nonclient.c
View file @
3f03975f
...
...
@@ -1961,7 +1961,8 @@ static LONG NC_StartSizeMove( WND* wndPtr, WPARAM16 wParam,
{
while
(
!
hittest
)
{
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
0
,
0
,
MSGF_SIZE
,
PM_REMOVE
,
FALSE
,
NULL
);
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_KEYFIRST
,
WM_MOUSELAST
,
MSGF_SIZE
,
PM_REMOVE
,
FALSE
,
NULL
);
switch
(
msg
.
message
)
{
case
WM_MOUSEMOVE
:
...
...
@@ -2128,7 +2129,7 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
{
int
dx
=
0
,
dy
=
0
;
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
0
,
0
,
MSGF_SIZE
,
PM_REMOVE
,
FALSE
,
NULL
);
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
0
,
0
,
MSGF_SIZE
,
PM_REMOVE
,
FALSE
,
NULL
);
/* Exit on button-up, Return, or Esc */
if
((
msg
.
message
==
WM_LBUTTONUP
)
||
...
...
@@ -2359,7 +2360,8 @@ static void NC_TrackMinMaxBox95( HWND hwnd, WORD wParam )
while
(
1
)
{
BOOL
oldstate
=
pressed
;
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
0
,
0
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
if
(
msg
.
message
==
WM_LBUTTONUP
)
break
;
...
...
@@ -2414,7 +2416,8 @@ static void NC_TrackMinMaxBox( HWND hwnd, WORD wParam )
while
(
1
)
{
BOOL
oldstate
=
pressed
;
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
0
,
0
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
if
(
msg
.
message
==
WM_LBUTTONUP
)
break
;
...
...
@@ -2475,7 +2478,8 @@ NC_TrackCloseButton95 (HWND hwnd, WORD wParam)
while
(
1
)
{
BOOL
oldstate
=
pressed
;
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
0
,
0
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
if
(
msg
.
message
==
WM_LBUTTONUP
)
break
;
...
...
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