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
74cd76c9
Commit
74cd76c9
authored
Aug 29, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Tool windows should not have WM decorations.
parent
8765a0da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
window.c
dlls/winex11.drv/window.c
+24
-14
No files found.
dlls/winex11.drv/window.c
View file @
74cd76c9
...
...
@@ -560,23 +560,26 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
mwm_hints
.
flags
=
MWM_HINTS_FUNCTIONS
|
MWM_HINTS_DECORATIONS
;
mwm_hints
.
functions
=
MWM_FUNC_MOVE
;
if
(
style
&
WS_THICKFRAME
)
mwm_hints
.
functions
|=
MWM_FUNC_RESIZE
;
if
(
style
&
WS_THICKFRAME
)
mwm_hints
.
functions
|=
MWM_FUNC_RESIZE
;
if
(
style
&
WS_MINIMIZEBOX
)
mwm_hints
.
functions
|=
MWM_FUNC_MINIMIZE
;
if
(
style
&
WS_MAXIMIZEBOX
)
mwm_hints
.
functions
|=
MWM_FUNC_MAXIMIZE
;
if
(
style
&
WS_SYSMENU
)
mwm_hints
.
functions
|=
MWM_FUNC_CLOSE
;
if
(
style
&
WS_SYSMENU
)
mwm_hints
.
functions
|=
MWM_FUNC_CLOSE
;
mwm_hints
.
decorations
=
0
;
if
(
(
style
&
WS_CAPTION
)
==
WS_CAPTION
)
if
(
!
(
ex_style
&
WS_EX_TOOLWINDOW
))
{
mwm_hints
.
decorations
|=
MWM_DECOR_TITLE
;
if
(
style
&
WS_SYSMENU
)
mwm_hints
.
decorations
|=
MWM_DECOR_MENU
;
if
(
style
&
WS_MINIMIZEBOX
)
mwm_hints
.
decorations
|=
MWM_DECOR_MINIMIZE
;
if
(
style
&
WS_MAXIMIZEBOX
)
mwm_hints
.
decorations
|=
MWM_DECOR_MAXIMIZE
;
if
((
style
&
WS_CAPTION
)
==
WS_CAPTION
)
{
mwm_hints
.
decorations
|=
MWM_DECOR_TITLE
;
if
(
style
&
WS_SYSMENU
)
mwm_hints
.
decorations
|=
MWM_DECOR_MENU
;
if
(
style
&
WS_MINIMIZEBOX
)
mwm_hints
.
decorations
|=
MWM_DECOR_MINIMIZE
;
if
(
style
&
WS_MAXIMIZEBOX
)
mwm_hints
.
decorations
|=
MWM_DECOR_MAXIMIZE
;
}
if
(
ex_style
&
WS_EX_DLGMODALFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
style
&
WS_THICKFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
|
MWM_DECOR_RESIZEH
;
else
if
((
style
&
(
WS_DLGFRAME
|
WS_BORDER
))
==
WS_DLGFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
style
&
WS_BORDER
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
!
(
style
&
(
WS_CHILD
|
WS_POPUP
)))
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
}
if
(
ex_style
&
WS_EX_DLGMODALFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
style
&
WS_THICKFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
|
MWM_DECOR_RESIZEH
;
else
if
((
style
&
(
WS_DLGFRAME
|
WS_BORDER
))
==
WS_DLGFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
style
&
WS_BORDER
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
!
(
style
&
(
WS_CHILD
|
WS_POPUP
)))
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
XChangeProperty
(
display
,
data
->
whole_window
,
x11drv_atom
(
_MOTIF_WM_HINTS
),
x11drv_atom
(
_MOTIF_WM_HINTS
),
32
,
PropModeReplace
,
...
...
@@ -650,14 +653,17 @@ void X11DRV_set_iconic_state( HWND hwnd )
void
X11DRV_window_to_X_rect
(
struct
x11drv_win_data
*
data
,
RECT
*
rect
)
{
RECT
rc
;
DWORD
ex_style
;
if
(
!
data
->
managed
)
return
;
if
(
IsRectEmpty
(
rect
))
return
;
ex_style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_EXSTYLE
);
if
(
ex_style
&
WS_EX_TOOLWINDOW
)
return
;
rc
.
top
=
rc
.
bottom
=
rc
.
left
=
rc
.
right
=
0
;
AdjustWindowRectEx
(
&
rc
,
GetWindowLongW
(
data
->
hwnd
,
GWL_STYLE
)
&
~
(
WS_HSCROLL
|
WS_VSCROLL
),
FALSE
,
GetWindowLongW
(
data
->
hwnd
,
GWL_EXSTYLE
)
);
FALSE
,
ex_style
);
rect
->
left
-=
rc
.
left
;
rect
->
right
-=
rc
.
right
;
...
...
@@ -675,11 +681,15 @@ void X11DRV_window_to_X_rect( struct x11drv_win_data *data, RECT *rect )
*/
void
X11DRV_X_to_window_rect
(
struct
x11drv_win_data
*
data
,
RECT
*
rect
)
{
DWORD
ex_style
;
if
(
!
data
->
managed
)
return
;
if
(
IsRectEmpty
(
rect
))
return
;
ex_style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_EXSTYLE
);
if
(
ex_style
&
WS_EX_TOOLWINDOW
)
return
;
AdjustWindowRectEx
(
rect
,
GetWindowLongW
(
data
->
hwnd
,
GWL_STYLE
)
&
~
(
WS_HSCROLL
|
WS_VSCROLL
),
FALSE
,
GetWindowLongW
(
data
->
hwnd
,
GWL_EXSTYLE
)
);
FALSE
,
ex_style
);
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