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
2afbf9db
Commit
2afbf9db
authored
Mar 29, 2015
by
David Hedberg
Committed by
Alexandre Julliard
Apr 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Only attempt to update the layout if the dialog window exists.
parent
eb116d66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
itemdlg.c
dlls/comdlg32/itemdlg.c
+11
-14
No files found.
dlls/comdlg32/itemdlg.c
View file @
2afbf9db
...
...
@@ -1225,7 +1225,7 @@ static HRESULT init_custom_controls(FileDialogImpl *This)
/**************************************************************************
* Window related functions.
*/
static
SIZE
update_layout
(
FileDialogImpl
*
This
)
static
void
update_layout
(
FileDialogImpl
*
This
)
{
HDWP
hdwp
;
HWND
hwnd
;
...
...
@@ -1233,21 +1233,19 @@ static SIZE update_layout(FileDialogImpl *This)
RECT
cancel_rc
,
open_rc
;
RECT
filetype_rc
,
filename_rc
,
filenamelabel_rc
;
RECT
toolbar_rc
,
ebrowser_rc
,
customctrls_rc
;
int
missing_width
,
missing_height
;
static
const
UINT
vspacing
=
4
,
hspacing
=
4
;
SIZE
ret
;
static
const
UINT
min_width
=
320
,
min_height
=
200
;
GetClientRect
(
This
->
dlg_hwnd
,
&
dialog_rc
);
missing_width
=
max
(
0
,
320
-
dialog_rc
.
right
);
missing_height
=
max
(
0
,
200
-
dialog_rc
.
bottom
);
if
(
!
GetClientRect
(
This
->
dlg_hwnd
,
&
dialog_rc
))
{
TRACE
(
"Invalid dialog window, not updating layout
\n
"
);
return
;
}
if
(
missing_width
||
missing
_height
)
if
(
dialog_rc
.
right
<
min_width
||
dialog_rc
.
bottom
<
min
_height
)
{
TRACE
(
"Missing (%d, %d)
\n
"
,
missing_width
,
missing_height
);
ret
.
cx
=
missing_width
;
ret
.
cy
=
missing_height
;
return
ret
;
TRACE
(
"Dialog size (%d, %d) too small, not updating layout
\n
"
,
dialog_rc
.
right
,
dialog_rc
.
bottom
);
return
;
}
/****
...
...
@@ -1399,8 +1397,7 @@ static SIZE update_layout(FileDialogImpl *This)
else
ERR
(
"Failed to position dialog controls.
\n
"
);
ret
.
cx
=
0
;
ret
.
cy
=
0
;
return
ret
;
return
;
}
static
HRESULT
init_explorerbrowser
(
FileDialogImpl
*
This
)
...
...
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