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
14a6c98f
Commit
14a6c98f
authored
Feb 14, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/pager: Don't block window size changes.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
948dd848
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
32 deletions
+24
-32
pager.c
dlls/comctl32/pager.c
+0
-31
pager.c
dlls/comctl32/tests/pager.c
+24
-1
No files found.
dlls/comctl32/pager.c
View file @
14a6c98f
...
...
@@ -388,34 +388,6 @@ PAGER_SetPos(PAGER_INFO* infoPtr, INT newPos, BOOL fromBtnPress)
return
0
;
}
static
LRESULT
PAGER_WindowPosChanging
(
PAGER_INFO
*
infoPtr
,
WINDOWPOS
*
winpos
)
{
if
((
infoPtr
->
dwStyle
&
CCS_NORESIZE
)
&&
!
(
winpos
->
flags
&
SWP_NOSIZE
))
{
/* don't let the app resize the nonscrollable dimension of a control
* that was created with CCS_NORESIZE style
* (i.e. height for a horizontal pager, or width for a vertical one) */
/* except if the current dimension is 0 and app is setting for
* first time, then save amount as dimension. - GA 8/01 */
if
(
infoPtr
->
dwStyle
&
PGS_HORZ
)
if
(
!
infoPtr
->
nHeight
&&
winpos
->
cy
)
infoPtr
->
nHeight
=
winpos
->
cy
;
else
winpos
->
cy
=
infoPtr
->
nHeight
;
else
if
(
!
infoPtr
->
nWidth
&&
winpos
->
cx
)
infoPtr
->
nWidth
=
winpos
->
cx
;
else
winpos
->
cx
=
infoPtr
->
nWidth
;
return
0
;
}
return
DefWindowProcW
(
infoPtr
->
hwndSelf
,
WM_WINDOWPOSCHANGING
,
0
,
(
LPARAM
)
winpos
);
}
/******************************************************************
* For the PGM_RECALCSIZE message (but not the other uses in *
* this module), the native control does only the following: *
...
...
@@ -1096,9 +1068,6 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_NCPAINT
:
return
PAGER_NCPaint
(
infoPtr
,
(
HRGN
)
wParam
);
case
WM_WINDOWPOSCHANGING
:
return
PAGER_WindowPosChanging
(
infoPtr
,
(
WINDOWPOS
*
)
lParam
);
case
WM_STYLECHANGED
:
return
PAGER_StyleChanged
(
infoPtr
,
wParam
,
(
LPSTYLESTRUCT
)
lParam
);
...
...
dlls/comctl32/tests/pager.c
View file @
14a6c98f
...
...
@@ -170,7 +170,7 @@ static HWND create_pager_control( DWORD style )
static
void
test_pager
(
void
)
{
HWND
pager
,
child
;
RECT
rect
;
RECT
rect
,
rect2
;
pager
=
create_pager_control
(
PGS_HORZ
);
if
(
!
pager
)
...
...
@@ -204,6 +204,29 @@ static void test_pager(void)
ok_sequence
(
sequences
,
PAGER_SEQ_INDEX
,
set_pos_seq
,
"set pos"
,
TRUE
);
DestroyWindow
(
pager
);
/* Test if resizing works */
pager
=
create_pager_control
(
CCS_NORESIZE
);
ok
(
pager
!=
NULL
,
"failed to create pager control
\n
"
);
GetWindowRect
(
pager
,
&
rect
);
MoveWindow
(
pager
,
0
,
0
,
200
,
100
,
TRUE
);
GetWindowRect
(
pager
,
&
rect2
);
ok
(
rect2
.
right
-
rect2
.
left
>
rect
.
right
-
rect
.
left
,
"expected pager window to resize, %s
\n
"
,
wine_dbgstr_rect
(
&
rect2
));
DestroyWindow
(
pager
);
pager
=
create_pager_control
(
CCS_NORESIZE
|
PGS_HORZ
);
ok
(
pager
!=
NULL
,
"failed to create pager control
\n
"
);
GetWindowRect
(
pager
,
&
rect
);
MoveWindow
(
pager
,
0
,
0
,
100
,
200
,
TRUE
);
GetWindowRect
(
pager
,
&
rect2
);
ok
(
rect2
.
bottom
-
rect2
.
top
>
rect
.
bottom
-
rect
.
top
,
"expected pager window to resize, %s
\n
"
,
wine_dbgstr_rect
(
&
rect2
));
DestroyWindow
(
pager
);
}
START_TEST
(
pager
)
...
...
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