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
93825eab
Commit
93825eab
authored
Oct 30, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: SetWindowRgn should call SetWindowPos, not RedrawWindow.
parent
fd15a1d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
1 deletion
+75
-1
msg.c
dlls/user/tests/msg.c
+68
-0
winpos.c
dlls/user/winpos.c
+7
-1
No files found.
dlls/user/tests/msg.c
View file @
93825eab
...
...
@@ -7996,6 +7996,73 @@ static void test_TrackMouseEvent(void)
#undef track_hover_cancel
}
static
const
struct
message
WmSetWindowRgn
[]
=
{
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
,
SWP_NOCLIENTSIZE
|
SWP_NOCLIENTMOVE
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
|
SWP_NOZORDER
|
SWP_NOSIZE
|
SWP_NOMOVE
},
{
WM_NCCALCSIZE
,
sent
|
wparam
,
1
},
{
WM_NCPAINT
,
sent
},
/* wparam != 1 */
{
WM_GETTEXT
,
sent
|
defwinproc
|
optional
},
{
WM_ERASEBKGND
,
sent
|
optional
},
/* FIXME: remove optional once Wine is fixed */
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
,
SWP_NOCLIENTSIZE
|
SWP_NOCLIENTMOVE
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
|
SWP_NOZORDER
|
SWP_NOSIZE
|
SWP_NOMOVE
},
{
EVENT_OBJECT_LOCATIONCHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
static
const
struct
message
WmSetWindowRgn_no_redraw
[]
=
{
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
,
SWP_NOCLIENTSIZE
|
SWP_NOCLIENTMOVE
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
|
SWP_NOZORDER
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOREDRAW
},
{
WM_NCCALCSIZE
,
sent
|
wparam
,
1
},
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
,
SWP_NOCLIENTSIZE
|
SWP_NOCLIENTMOVE
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
|
SWP_NOZORDER
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOREDRAW
},
{
EVENT_OBJECT_LOCATIONCHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
static
const
struct
message
WmSetWindowRgn_clear
[]
=
{
{
WM_WINDOWPOSCHANGING
,
sent
|
wparam
,
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
|
SWP_NOZORDER
|
SWP_NOSIZE
|
SWP_NOMOVE
},
{
WM_NCCALCSIZE
,
sent
|
wparam
,
1
},
{
WM_NCPAINT
,
sent
},
/* wparam != 1 */
{
WM_GETTEXT
,
sent
|
defwinproc
|
optional
},
{
WM_ERASEBKGND
,
sent
|
optional
},
/* FIXME: remove optional once Wine is fixed */
{
WM_WINDOWPOSCHANGED
,
sent
|
wparam
,
SWP_NOCLIENTSIZE
|
SWP_NOCLIENTMOVE
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
|
SWP_NOZORDER
|
SWP_NOSIZE
|
SWP_NOMOVE
},
{
WM_NCCALCSIZE
,
sent
|
wparam
|
optional
,
1
},
{
WM_NCPAINT
,
sent
|
optional
},
/* wparam != 1 */
{
WM_GETTEXT
,
sent
|
defwinproc
|
optional
},
{
WM_ERASEBKGND
,
sent
|
optional
},
{
EVENT_OBJECT_LOCATIONCHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
EVENT_OBJECT_LOCATIONCHANGE
,
winevent_hook
|
wparam
|
lparam
,
0
,
0
},
{
0
}
};
static
void
test_SetWindowRgn
(
void
)
{
HRGN
hrgn
;
HWND
hwnd
=
CreateWindowExA
(
0
,
"TestWindowClass"
,
"Test overlapped"
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"Failed to create overlapped window
\n
"
);
ShowWindow
(
hwnd
,
SW_SHOW
);
UpdateWindow
(
hwnd
);
flush_events
();
flush_sequence
();
trace
(
"testing SetWindowRgn
\n
"
);
hrgn
=
CreateRectRgn
(
0
,
0
,
150
,
150
);
SetWindowRgn
(
hwnd
,
hrgn
,
TRUE
);
ok_sequence
(
WmSetWindowRgn
,
"WmSetWindowRgn"
,
FALSE
);
hrgn
=
CreateRectRgn
(
30
,
30
,
160
,
160
);
SetWindowRgn
(
hwnd
,
hrgn
,
FALSE
);
ok_sequence
(
WmSetWindowRgn_no_redraw
,
"WmSetWindowRgn_no_redraw"
,
FALSE
);
hrgn
=
CreateRectRgn
(
0
,
0
,
180
,
180
);
SetWindowRgn
(
hwnd
,
hrgn
,
TRUE
);
ok_sequence
(
WmSetWindowRgn
,
"WmSetWindowRgn2"
,
FALSE
);
SetWindowRgn
(
hwnd
,
0
,
TRUE
);
ok_sequence
(
WmSetWindowRgn_clear
,
"WmSetWindowRgn_clear"
,
FALSE
);
DestroyWindow
(
hwnd
);
}
START_TEST
(
msg
)
{
BOOL
ret
;
...
...
@@ -8060,6 +8127,7 @@ START_TEST(msg)
test_edit_messages
();
test_quit_message
();
test_TrackMouseEvent
();
test_SetWindowRgn
();
UnhookWindowsHookEx
(
hCBT_hook
);
if
(
pUnhookWinEvent
)
...
...
dlls/user/winpos.c
View file @
93825eab
...
...
@@ -265,7 +265,13 @@ int WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL bRedraw )
if
(
ret
)
ret
=
USER_Driver
->
pSetWindowRgn
(
hwnd
,
hrgn
,
bRedraw
);
if
(
ret
&&
bRedraw
)
RedrawWindow
(
hwnd
,
NULL
,
0
,
RDW_FRAME
|
RDW_INVALIDATE
|
RDW_ERASE
);
if
(
ret
)
{
UINT
swp_flags
=
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_FRAMECHANGED
;
if
(
hrgn
)
swp_flags
|=
SWP_NOCLIENTSIZE
|
SWP_NOCLIENTMOVE
;
if
(
!
bRedraw
)
swp_flags
|=
SWP_NOREDRAW
;
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
swp_flags
);
}
return
ret
;
}
...
...
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