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
bfb4a23a
Commit
bfb4a23a
authored
Aug 06, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced MSG_InternalGetMessage calls by equivalent exported APIs.
parent
4de0df77
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
33 deletions
+60
-33
menu.c
controls/menu.c
+19
-3
winpos.c
dlls/x11drv/winpos.c
+5
-4
dialog.c
windows/dialog.c
+17
-6
nonclient.c
windows/nonclient.c
+19
-20
No files found.
controls/menu.c
View file @
bfb4a23a
...
...
@@ -2655,13 +2655,29 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
menu
=
MENU_GetMenu
(
mt
.
hCurrentMenu
);
if
(
!
menu
)
/* sometimes happens if I do a window manager close */
break
;
msg
.
hwnd
=
(
wFlags
&
TPM_ENTERIDLEEX
&&
menu
->
wFlags
&
MF_POPUP
)
?
menu
->
hWnd
:
0
;
/* we have to keep the message in the queue until it's
* clear that menu loop is not over yet. */
if
(
!
MSG_InternalGetMessage
(
&
msg
,
msg
.
hwnd
,
mt
.
hOwnerWnd
,
0
,
0
,
MSGF_MENU
,
PM_NOREMOVE
,
!
enterIdleSent
,
&
enterIdleSent
))
break
;
for
(;;)
{
if
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
PM_NOREMOVE
))
{
if
(
!
CallMsgFilterA
(
&
msg
,
MSGF_MENU
))
break
;
/* remove the message from the queue */
PeekMessageA
(
&
msg
,
0
,
msg
.
message
,
msg
.
message
,
PM_REMOVE
);
}
else
{
if
(
!
enterIdleSent
)
{
HWND
win
=
(
wFlags
&
TPM_ENTERIDLEEX
&&
menu
->
wFlags
&
MF_POPUP
)
?
menu
->
hWnd
:
0
;
enterIdleSent
=
TRUE
;
SendMessageW
(
mt
.
hOwnerWnd
,
WM_ENTERIDLE
,
MSGF_MENU
,
(
LPARAM
)
win
);
}
WaitMessage
();
}
}
/* check if EndMenu() tried to cancel us, by posting this message */
if
(
msg
.
message
==
WM_CANCELMODE
)
...
...
dlls/x11drv/winpos.c
View file @
bfb4a23a
...
...
@@ -1596,8 +1596,9 @@ static LONG start_size_move( WND* wndPtr, WPARAM wParam, POINT *capturePoint )
{
while
(
!
hittest
)
{
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_KEYFIRST
,
WM_MOUSELAST
,
MSGF_SIZE
,
PM_REMOVE
,
FALSE
,
NULL
);
GetMessageW
(
&
msg
,
0
,
WM_KEYFIRST
,
WM_MOUSELAST
);
if
(
CallMsgFilterW
(
&
msg
,
MSGF_SIZE
))
continue
;
switch
(
msg
.
message
)
{
case
WM_MOUSEMOVE
:
...
...
@@ -1776,8 +1777,8 @@ void X11DRV_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
{
int
dx
=
0
,
dy
=
0
;
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_KEYFIRST
,
WM_MOUSELAST
,
MSGF_SIZE
,
PM_REMOVE
,
FALSE
,
NULL
)
;
if
(
!
GetMessageW
(
&
msg
,
0
,
WM_KEYFIRST
,
WM_MOUSELAST
))
break
;
if
(
CallMsgFilterW
(
&
msg
,
MSGF_SIZE
))
continue
;
/* Exit on button-up, Return, or Esc */
if
((
msg
.
message
==
WM_LBUTTONUP
)
||
...
...
windows/dialog.c
View file @
bfb4a23a
...
...
@@ -25,7 +25,6 @@
#include "heap.h"
#include "win.h"
#include "user.h"
#include "message.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
dialog
);
...
...
@@ -1053,13 +1052,25 @@ 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
(
&
msg
,
hwnd
,
ownerMsg
,
0
,
0
,
MSGF_DIALOGBOX
,
PM_REMOVE
,
!
(
wndPtr
->
dwStyle
&
DS_NOIDLEMSG
),
NULL
))
for
(;;)
{
if
(
!
(
dlgInfo
->
flags
&
DF_END
)
&&
(
!
IsDialogMessageA
(
hwnd
,
&
msg
)))
if
(
!
(
wndPtr
->
dwStyle
&
DS_NOIDLEMSG
))
{
if
(
!
PeekMessageW
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
/* No message present -> send ENTERIDLE and wait */
SendMessageW
(
ownerMsg
,
WM_ENTERIDLE
,
MSGF_DIALOGBOX
,
(
LPARAM
)
hwnd
);
if
(
!
GetMessageW
(
&
msg
,
0
,
0
,
0
))
break
;
}
}
else
if
(
!
GetMessageW
(
&
msg
,
0
,
0
,
0
))
break
;
if
(
CallMsgFilterW
(
&
msg
,
MSGF_DIALOGBOX
))
continue
;
if
(
!
(
dlgInfo
->
flags
&
DF_END
)
&&
!
IsDialogMessageW
(
hwnd
,
&
msg
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
A
(
&
msg
);
DispatchMessage
W
(
&
msg
);
}
if
(
dlgInfo
->
flags
&
DF_END
)
break
;
}
...
...
@@ -1460,7 +1471,7 @@ static BOOL DIALOG_IsDialogMessage( HWND hwnd, HWND hwndDlg,
case
VK_RETURN
:
{
DWORD
dw
=
SendMessage
16
(
hwndDlg
,
DM_GETDEFID
,
0
,
0
);
DWORD
dw
=
SendMessage
W
(
hwndDlg
,
DM_GETDEFID
,
0
,
0
);
if
(
HIWORD
(
dw
)
==
DC_HASDEFID
)
{
SendMessageA
(
hwndDlg
,
WM_COMMAND
,
...
...
windows/nonclient.c
View file @
bfb4a23a
...
...
@@ -10,7 +10,6 @@
#include "wine/winuser16.h"
#include "version.h"
#include "win.h"
#include "message.h"
#include "user.h"
#include "heap.h"
#include "dce.h"
...
...
@@ -1847,8 +1846,9 @@ static void NC_TrackMinMaxBox95( HWND hwnd, WORD wParam )
while
(
1
)
{
BOOL
oldstate
=
pressed
;
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
if
(
!
GetMessageW
(
&
msg
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
))
break
;
if
(
CallMsgFilterW
(
&
msg
,
MSGF_MAX
))
continue
;
if
(
msg
.
message
==
WM_LBUTTONUP
)
break
;
...
...
@@ -1903,8 +1903,9 @@ static void NC_TrackMinMaxBox( HWND hwnd, WORD wParam )
while
(
1
)
{
BOOL
oldstate
=
pressed
;
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
if
(
!
GetMessageW
(
&
msg
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
))
break
;
if
(
CallMsgFilterW
(
&
msg
,
MSGF_MAX
))
continue
;
if
(
msg
.
message
==
WM_LBUTTONUP
)
break
;
...
...
@@ -1965,8 +1966,9 @@ NC_TrackCloseButton95 (HWND hwnd, WORD wParam)
while
(
1
)
{
BOOL
oldstate
=
pressed
;
MSG_InternalGetMessage
(
&
msg
,
0
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
,
0
,
PM_REMOVE
,
FALSE
,
NULL
);
if
(
!
GetMessageW
(
&
msg
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
))
break
;
if
(
CallMsgFilterW
(
&
msg
,
MSGF_MAX
))
continue
;
if
(
msg
.
message
==
WM_LBUTTONUP
)
break
;
...
...
@@ -1997,7 +1999,7 @@ NC_TrackCloseButton95 (HWND hwnd, WORD wParam)
*/
static
void
NC_TrackScrollBar
(
HWND
hwnd
,
WPARAM
wParam
,
POINT
pt
)
{
MSG
16
*
msg
;
MSG
msg
;
INT
scrollbar
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
...
...
@@ -2012,7 +2014,6 @@ static void NC_TrackScrollBar( HWND hwnd, WPARAM wParam, POINT pt )
scrollbar
=
SB_VERT
;
}
if
(
!
(
msg
=
SEGPTR_NEW
(
MSG16
)))
goto
END
;
pt
.
x
-=
wndPtr
->
rectWindow
.
left
;
pt
.
y
-=
wndPtr
->
rectWindow
.
top
;
SetCapture
(
hwnd
);
...
...
@@ -2020,21 +2021,20 @@ static void NC_TrackScrollBar( HWND hwnd, WPARAM wParam, POINT pt )
do
{
GetMessage16
(
SEGPTR_GET
(
msg
),
0
,
0
,
0
);
switch
(
msg
->
message
)
if
(
!
GetMessageW
(
&
msg
,
0
,
0
,
0
))
break
;
if
(
CallMsgFilterW
(
&
msg
,
MSGF_SCROLLBAR
))
continue
;
switch
(
msg
.
message
)
{
case
WM_LBUTTONUP
:
case
WM_MOUSEMOVE
:
case
WM_SYSTIMER
:
pt
.
x
=
LOWORD
(
msg
->
lParam
)
+
wndPtr
->
rectClient
.
left
-
wndPtr
->
rectWindow
.
left
;
pt
.
y
=
HIWORD
(
msg
->
lParam
)
+
wndPtr
->
rectClient
.
top
-
wndPtr
->
rectWindow
.
top
;
SCROLL_HandleScrollEvent
(
hwnd
,
scrollbar
,
msg
->
message
,
pt
);
pt
.
x
=
LOWORD
(
msg
.
lParam
)
+
wndPtr
->
rectClient
.
left
-
wndPtr
->
rectWindow
.
left
;
pt
.
y
=
HIWORD
(
msg
.
lParam
)
+
wndPtr
->
rectClient
.
top
-
wndPtr
->
rectWindow
.
top
;
SCROLL_HandleScrollEvent
(
hwnd
,
scrollbar
,
msg
.
message
,
pt
);
break
;
default:
TranslateMessage
16
(
msg
);
DispatchMessage
16
(
msg
);
TranslateMessage
(
&
msg
);
DispatchMessage
W
(
&
msg
);
break
;
}
if
(
!
IsWindow
(
hwnd
))
...
...
@@ -2042,8 +2042,7 @@ static void NC_TrackScrollBar( HWND hwnd, WPARAM wParam, POINT pt )
ReleaseCapture
();
break
;
}
}
while
(
msg
->
message
!=
WM_LBUTTONUP
);
SEGPTR_FREE
(
msg
);
}
while
(
msg
.
message
!=
WM_LBUTTONUP
);
END:
WIN_ReleaseWndPtr
(
wndPtr
);
}
...
...
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