Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8cd1f719
Commit
8cd1f719
authored
Jul 20, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use AdjustWindowRect to translate X to window rectangle instead of
duplicating what's done in nonclient.c.
parent
cbfbf2a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
46 deletions
+9
-46
window.c
dlls/x11drv/window.c
+9
-46
No files found.
dlls/x11drv/window.c
View file @
8cd1f719
...
...
@@ -32,13 +32,6 @@ extern Pixmap X11DRV_BITMAP_Pixmap( HBITMAP );
(((exStyle) & WS_EX_DLGMODALFRAME) || \
(((style) & WS_DLGFRAME) && !((style) & WS_THICKFRAME)))
#define HAS_THICKFRAME(style,exStyle) \
(((style) & WS_THICKFRAME) && \
!(((style) & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME))
#define HAS_THINFRAME(style) \
(((style) & WS_BORDER) || !((style) & (WS_CHILD | WS_POPUP)))
/* X context to associate a hwnd to an X window */
XContext
winContext
=
0
;
...
...
@@ -442,30 +435,19 @@ void X11DRV_set_iconic_state( WND *win )
*/
void
X11DRV_window_to_X_rect
(
WND
*
win
,
RECT
*
rect
)
{
RECT
rc
;
if
(
!
(
win
->
dwExStyle
&
WS_EX_MANAGED
))
return
;
if
(
win
->
dwStyle
&
WS_ICONIC
)
return
;
if
(
IsRectEmpty
(
rect
))
return
;
if
(
HAS_THICKFRAME
(
win
->
dwStyle
,
win
->
dwExStyle
))
InflateRect
(
rect
,
-
GetSystemMetrics
(
SM_CXFRAME
),
-
GetSystemMetrics
(
SM_CYFRAME
)
);
else
if
(
HAS_DLGFRAME
(
win
->
dwStyle
,
win
->
dwExStyle
))
InflateRect
(
rect
,
-
GetSystemMetrics
(
SM_CXDLGFRAME
),
-
GetSystemMetrics
(
SM_CYDLGFRAME
)
);
else
if
(
HAS_THINFRAME
(
win
->
dwStyle
))
InflateRect
(
rect
,
-
GetSystemMetrics
(
SM_CXBORDER
),
-
GetSystemMetrics
(
SM_CYBORDER
)
);
if
((
win
->
dwStyle
&
WS_CAPTION
)
==
WS_CAPTION
)
{
if
(
win
->
dwExStyle
&
WS_EX_TOOLWINDOW
)
rect
->
top
+=
GetSystemMetrics
(
SM_CYSMCAPTION
);
else
rect
->
top
+=
GetSystemMetrics
(
SM_CYCAPTION
);
}
rc
.
top
=
rc
.
bottom
=
rc
.
left
=
rc
.
right
=
0
;
if
(
win
->
dwExStyle
&
WS_EX_CLIENTEDGE
)
InflateRect
(
rect
,
-
GetSystemMetrics
(
SM_CXEDGE
),
-
GetSystemMetrics
(
SM_CYEDGE
)
);
if
(
win
->
dwExStyle
&
WS_EX_STATICEDGE
)
InflateRect
(
rect
,
-
GetSystemMetrics
(
SM_CXBORDER
),
-
GetSystemMetrics
(
SM_CYBORDER
)
);
AdjustWindowRectEx
(
&
rc
,
win
->
dwStyle
&
~
(
WS_HSCROLL
|
WS_VSCROLL
),
FALSE
,
win
->
dwExStyle
);
rect
->
left
-=
rc
.
left
;
rect
->
right
-=
rc
.
right
;
rect
->
top
-=
rc
.
top
;
rect
->
bottom
-=
rc
.
bottom
;
if
(
rect
->
top
>=
rect
->
bottom
)
rect
->
bottom
=
rect
->
top
+
1
;
if
(
rect
->
left
>=
rect
->
right
)
rect
->
right
=
rect
->
left
+
1
;
}
...
...
@@ -479,28 +461,9 @@ void X11DRV_window_to_X_rect( WND *win, RECT *rect )
void
X11DRV_X_to_window_rect
(
WND
*
win
,
RECT
*
rect
)
{
if
(
!
(
win
->
dwExStyle
&
WS_EX_MANAGED
))
return
;
if
(
win
->
dwStyle
&
WS_ICONIC
)
return
;
if
(
IsRectEmpty
(
rect
))
return
;
if
(
HAS_THICKFRAME
(
win
->
dwStyle
,
win
->
dwExStyle
))
InflateRect
(
rect
,
GetSystemMetrics
(
SM_CXFRAME
),
GetSystemMetrics
(
SM_CYFRAME
)
);
else
if
(
HAS_DLGFRAME
(
win
->
dwStyle
,
win
->
dwExStyle
))
InflateRect
(
rect
,
GetSystemMetrics
(
SM_CXDLGFRAME
),
GetSystemMetrics
(
SM_CYDLGFRAME
)
);
else
if
(
HAS_THINFRAME
(
win
->
dwStyle
))
InflateRect
(
rect
,
GetSystemMetrics
(
SM_CXBORDER
),
GetSystemMetrics
(
SM_CYBORDER
)
);
if
((
win
->
dwStyle
&
WS_CAPTION
)
==
WS_CAPTION
)
{
if
(
win
->
dwExStyle
&
WS_EX_TOOLWINDOW
)
rect
->
top
-=
GetSystemMetrics
(
SM_CYSMCAPTION
);
else
rect
->
top
-=
GetSystemMetrics
(
SM_CYCAPTION
);
}
if
(
win
->
dwExStyle
&
WS_EX_CLIENTEDGE
)
InflateRect
(
rect
,
GetSystemMetrics
(
SM_CXEDGE
),
GetSystemMetrics
(
SM_CYEDGE
)
);
if
(
win
->
dwExStyle
&
WS_EX_STATICEDGE
)
InflateRect
(
rect
,
GetSystemMetrics
(
SM_CXBORDER
),
GetSystemMetrics
(
SM_CYBORDER
)
);
AdjustWindowRectEx
(
rect
,
win
->
dwStyle
&
~
(
WS_HSCROLL
|
WS_VSCROLL
),
FALSE
,
win
->
dwExStyle
);
if
(
rect
->
top
>=
rect
->
bottom
)
rect
->
bottom
=
rect
->
top
+
1
;
if
(
rect
->
left
>=
rect
->
right
)
rect
->
right
=
rect
->
left
+
1
;
...
...
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