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
bcb1f8fe
Commit
bcb1f8fe
authored
Oct 30, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of the WIN_NEEDS_BEGINPAINT flag, Windows will happily loop
forever too if WM_PAINT is not handled properly.
parent
96ca3ac6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
66 deletions
+6
-66
msg16.c
dlls/user/msg16.c
+1
-22
painting.c
dlls/user/painting.c
+1
-1
win.h
include/win.h
+0
-1
message.c
windows/message.c
+4
-42
No files found.
dlls/user/msg16.c
View file @
bcb1f8fe
...
@@ -254,7 +254,6 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
...
@@ -254,7 +254,6 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
WND
*
wndPtr
;
WND
*
wndPtr
;
WNDPROC16
winproc
;
WNDPROC16
winproc
;
LONG
retval
;
LONG
retval
;
int
painting
;
HWND
hwnd
=
WIN_Handle32
(
msg
->
hwnd
);
HWND
hwnd
=
WIN_Handle32
(
msg
->
hwnd
);
/* Process timer messages */
/* Process timer messages */
...
@@ -285,33 +284,13 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
...
@@ -285,33 +284,13 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
SetLastError
(
ERROR_INVALID_WINDOW_HANDLE
);
SetLastError
(
ERROR_INVALID_WINDOW_HANDLE
);
return
0
;
return
0
;
}
}
winproc
=
(
WNDPROC16
)
wndPtr
->
winproc
;
if
(
!
(
winproc
=
(
WNDPROC16
)
wndPtr
->
winproc
))
{
WIN_ReleasePtr
(
wndPtr
);
return
0
;
}
painting
=
(
msg
->
message
==
WM_PAINT
);
if
(
painting
)
wndPtr
->
flags
|=
WIN_NEEDS_BEGINPAINT
;
WIN_ReleasePtr
(
wndPtr
);
WIN_ReleasePtr
(
wndPtr
);
SPY_EnterMessage
(
SPY_DISPATCHMESSAGE16
,
hwnd
,
msg
->
message
,
msg
->
wParam
,
msg
->
lParam
);
SPY_EnterMessage
(
SPY_DISPATCHMESSAGE16
,
hwnd
,
msg
->
message
,
msg
->
wParam
,
msg
->
lParam
);
retval
=
CallWindowProc16
(
winproc
,
msg
->
hwnd
,
msg
->
message
,
msg
->
wParam
,
msg
->
lParam
);
retval
=
CallWindowProc16
(
winproc
,
msg
->
hwnd
,
msg
->
message
,
msg
->
wParam
,
msg
->
lParam
);
SPY_ExitMessage
(
SPY_RESULT_OK16
,
hwnd
,
msg
->
message
,
retval
,
msg
->
wParam
,
msg
->
lParam
);
SPY_ExitMessage
(
SPY_RESULT_OK16
,
hwnd
,
msg
->
message
,
retval
,
msg
->
wParam
,
msg
->
lParam
);
if
(
painting
&&
(
wndPtr
=
WIN_GetPtr
(
hwnd
))
&&
(
wndPtr
!=
WND_OTHER_PROCESS
))
{
BOOL
validate
=
((
wndPtr
->
flags
&
WIN_NEEDS_BEGINPAINT
)
&&
wndPtr
->
hrgnUpdate
);
wndPtr
->
flags
&=
~
WIN_NEEDS_BEGINPAINT
;
WIN_ReleasePtr
(
wndPtr
);
if
(
validate
)
{
ERR
(
"BeginPaint not called on WM_PAINT for hwnd %p!
\n
"
,
hwnd
);
/* Validate the update region to avoid infinite WM_PAINT loop */
RedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_NOFRAME
|
RDW_VALIDATE
|
RDW_NOCHILDREN
|
RDW_NOINTERNALPAINT
);
}
}
return
retval
;
return
retval
;
}
}
...
...
dlls/user/painting.c
View file @
bcb1f8fe
...
@@ -159,7 +159,7 @@ static HRGN begin_ncpaint( HWND hwnd )
...
@@ -159,7 +159,7 @@ static HRGN begin_ncpaint( HWND hwnd )
if
(
wnd
->
hrgnUpdate
||
(
wnd
->
flags
&
WIN_INTERNAL_PAINT
))
add_paint_count
(
hwnd
,
-
1
);
if
(
wnd
->
hrgnUpdate
||
(
wnd
->
flags
&
WIN_INTERNAL_PAINT
))
add_paint_count
(
hwnd
,
-
1
);
if
(
wnd
->
hrgnUpdate
>
(
HRGN
)
1
)
DeleteObject
(
wnd
->
hrgnUpdate
);
if
(
wnd
->
hrgnUpdate
>
(
HRGN
)
1
)
DeleteObject
(
wnd
->
hrgnUpdate
);
wnd
->
hrgnUpdate
=
0
;
wnd
->
hrgnUpdate
=
0
;
wnd
->
flags
&=
~
(
WIN_INTERNAL_PAINT
|
WIN_NEEDS_NCPAINT
|
WIN_NEEDS_BEGINPAINT
);
wnd
->
flags
&=
~
(
WIN_INTERNAL_PAINT
|
WIN_NEEDS_NCPAINT
);
if
(
client_rgn
>
(
HRGN
)
1
)
OffsetRgn
(
client_rgn
,
wnd
->
rectWindow
.
left
-
wnd
->
rectClient
.
left
,
if
(
client_rgn
>
(
HRGN
)
1
)
OffsetRgn
(
client_rgn
,
wnd
->
rectWindow
.
left
-
wnd
->
rectClient
.
left
,
wnd
->
rectWindow
.
top
-
wnd
->
rectClient
.
top
);
wnd
->
rectWindow
.
top
-
wnd
->
rectClient
.
top
);
WIN_ReleasePtr
(
wnd
);
WIN_ReleasePtr
(
wnd
);
...
...
include/win.h
View file @
bcb1f8fe
...
@@ -78,7 +78,6 @@ typedef struct
...
@@ -78,7 +78,6 @@ typedef struct
}
INTERNALPOS
,
*
LPINTERNALPOS
;
}
INTERNALPOS
,
*
LPINTERNALPOS
;
/* WND flags values */
/* WND flags values */
#define WIN_NEEDS_BEGINPAINT 0x0001
/* WM_PAINT sent to window */
#define WIN_NEEDS_ERASEBKGND 0x0002
/* WM_ERASEBKGND must be sent to window*/
#define WIN_NEEDS_ERASEBKGND 0x0002
/* WM_ERASEBKGND must be sent to window*/
#define WIN_NEEDS_NCPAINT 0x0004
/* WM_NCPAINT must be sent to window */
#define WIN_NEEDS_NCPAINT 0x0004
/* WM_NCPAINT must be sent to window */
#define WIN_RESTORE_MAX 0x0008
/* Maximize when restoring */
#define WIN_RESTORE_MAX 0x0008
/* Maximize when restoring */
...
...
windows/message.c
View file @
bcb1f8fe
...
@@ -749,7 +749,6 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
...
@@ -749,7 +749,6 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
{
{
WND
*
wndPtr
;
WND
*
wndPtr
;
LONG
retval
;
LONG
retval
;
int
painting
;
WNDPROC
winproc
;
WNDPROC
winproc
;
/* Process timer messages */
/* Process timer messages */
...
@@ -787,14 +786,9 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
...
@@ -787,14 +786,9 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
WIN_ReleasePtr
(
wndPtr
);
WIN_ReleasePtr
(
wndPtr
);
return
0
;
return
0
;
}
}
if
(
!
(
winproc
=
wndPtr
->
winproc
))
winproc
=
wndPtr
->
winproc
;
{
WIN_ReleasePtr
(
wndPtr
);
return
0
;
}
painting
=
(
msg
->
message
==
WM_PAINT
);
if
(
painting
)
wndPtr
->
flags
|=
WIN_NEEDS_BEGINPAINT
;
WIN_ReleasePtr
(
wndPtr
);
WIN_ReleasePtr
(
wndPtr
);
/* hook_CallHooks32A( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */
/* hook_CallHooks32A( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */
SPY_EnterMessage
(
SPY_DISPATCHMESSAGE
,
msg
->
hwnd
,
msg
->
message
,
SPY_EnterMessage
(
SPY_DISPATCHMESSAGE
,
msg
->
hwnd
,
msg
->
message
,
...
@@ -804,19 +798,6 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
...
@@ -804,19 +798,6 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
SPY_ExitMessage
(
SPY_RESULT_OK
,
msg
->
hwnd
,
msg
->
message
,
retval
,
SPY_ExitMessage
(
SPY_RESULT_OK
,
msg
->
hwnd
,
msg
->
message
,
retval
,
msg
->
wParam
,
msg
->
lParam
);
msg
->
wParam
,
msg
->
lParam
);
if
(
painting
&&
(
wndPtr
=
WIN_GetPtr
(
msg
->
hwnd
))
&&
(
wndPtr
!=
WND_OTHER_PROCESS
))
{
BOOL
validate
=
((
wndPtr
->
flags
&
WIN_NEEDS_BEGINPAINT
)
&&
wndPtr
->
hrgnUpdate
);
wndPtr
->
flags
&=
~
WIN_NEEDS_BEGINPAINT
;
WIN_ReleasePtr
(
wndPtr
);
if
(
validate
)
{
ERR
(
"BeginPaint not called on WM_PAINT for hwnd %p!
\n
"
,
msg
->
hwnd
);
/* Validate the update region to avoid infinite WM_PAINT loop */
RedrawWindow
(
msg
->
hwnd
,
NULL
,
0
,
RDW_NOFRAME
|
RDW_VALIDATE
|
RDW_NOCHILDREN
|
RDW_NOINTERNALPAINT
);
}
}
return
retval
;
return
retval
;
}
}
...
@@ -846,7 +827,6 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
...
@@ -846,7 +827,6 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
{
{
WND
*
wndPtr
;
WND
*
wndPtr
;
LONG
retval
;
LONG
retval
;
int
painting
;
WNDPROC
winproc
;
WNDPROC
winproc
;
/* Process timer messages */
/* Process timer messages */
...
@@ -884,14 +864,9 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
...
@@ -884,14 +864,9 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
WIN_ReleasePtr
(
wndPtr
);
WIN_ReleasePtr
(
wndPtr
);
return
0
;
return
0
;
}
}
if
(
!
(
winproc
=
wndPtr
->
winproc
))
winproc
=
wndPtr
->
winproc
;
{
WIN_ReleasePtr
(
wndPtr
);
return
0
;
}
painting
=
(
msg
->
message
==
WM_PAINT
);
if
(
painting
)
wndPtr
->
flags
|=
WIN_NEEDS_BEGINPAINT
;
WIN_ReleasePtr
(
wndPtr
);
WIN_ReleasePtr
(
wndPtr
);
/* HOOK_CallHooks32W( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */
/* HOOK_CallHooks32W( WH_CALLWNDPROC, HC_ACTION, 0, FIXME ); */
SPY_EnterMessage
(
SPY_DISPATCHMESSAGE
,
msg
->
hwnd
,
msg
->
message
,
SPY_EnterMessage
(
SPY_DISPATCHMESSAGE
,
msg
->
hwnd
,
msg
->
message
,
...
@@ -901,19 +876,6 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
...
@@ -901,19 +876,6 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
SPY_ExitMessage
(
SPY_RESULT_OK
,
msg
->
hwnd
,
msg
->
message
,
retval
,
SPY_ExitMessage
(
SPY_RESULT_OK
,
msg
->
hwnd
,
msg
->
message
,
retval
,
msg
->
wParam
,
msg
->
lParam
);
msg
->
wParam
,
msg
->
lParam
);
if
(
painting
&&
(
wndPtr
=
WIN_GetPtr
(
msg
->
hwnd
))
&&
(
wndPtr
!=
WND_OTHER_PROCESS
))
{
BOOL
validate
=
((
wndPtr
->
flags
&
WIN_NEEDS_BEGINPAINT
)
&&
wndPtr
->
hrgnUpdate
);
wndPtr
->
flags
&=
~
WIN_NEEDS_BEGINPAINT
;
WIN_ReleasePtr
(
wndPtr
);
if
(
validate
)
{
ERR
(
"BeginPaint not called on WM_PAINT for hwnd %p!
\n
"
,
msg
->
hwnd
);
/* Validate the update region to avoid infinite WM_PAINT loop */
RedrawWindow
(
msg
->
hwnd
,
NULL
,
0
,
RDW_NOFRAME
|
RDW_VALIDATE
|
RDW_NOCHILDREN
|
RDW_NOINTERNALPAINT
);
}
}
return
retval
;
return
retval
;
}
}
...
...
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