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
77e7fd7a
Commit
77e7fd7a
authored
Jan 21, 2002
by
Ove Kaaven
Committed by
Alexandre Julliard
Jan 21, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for MWM hints.
parent
b508a1da
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
3 deletions
+96
-3
mwm.h
dlls/x11drv/mwm.h
+65
-0
window.c
dlls/x11drv/window.c
+31
-3
No files found.
dlls/x11drv/mwm.h
0 → 100644
View file @
77e7fd7a
/*
* Motif Window Manager definitions
*
* Copyright 2001 Ove Kven, TransGaming Technologies Inc.
* (these definitions were found in GTK+ 1.2, gdk/MwmUtil.h)
*/
#ifndef __WINE_MWM_H
#define __WINE_MWM_H
typedef
struct
{
unsigned
long
flags
;
unsigned
long
functions
;
unsigned
long
decorations
;
long
input_mode
;
unsigned
long
status
;
}
MotifWmHints
,
MwmHints
;
#define MWM_HINTS_FUNCTIONS 1
#define MWM_HINTS_DECORATIONS 2
#define MWM_HINTS_INPUT_MODE 4
#define MWM_HINTS_STATUS 8
#define MWM_FUNC_ALL 0x01
#define MWM_FUNC_RESIZE 0x02
#define MWM_FUNC_MOVE 0x04
#define MWM_FUNC_MINIMIZE 0x08
#define MWM_FUNC_MAXIMIZE 0x10
#define MWM_FUNC_CLOSE 0x20
#define MWM_DECOR_ALL 0x01
#define MWM_DECOR_BORDER 0x02
#define MWM_DECOR_RESIZEH 0x04
#define MWM_DECOR_TITLE 0x08
#define MWM_DECOR_MENU 0x10
#define MWM_DECOR_MINIMIZE 0x20
#define MWM_DECOR_MAXIMIZE 0x40
#define MWM_INPUT_MODELESS 0
#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
#define MWM_INPUT_SYSTEM_MODAL 2
#define MWM_INPUT_FULL_APPLICATION_MODAL 3
#define MWM_INPUT_APPLICATION_MODAL 1
#define MWM_TEAROFF_WINDOW 1
typedef
struct
{
long
flags
;
Window
wm_window
;
}
MotifWmInfo
,
MwmInfo
;
#define MWM_INFO_STARTUP_STANDARD 1
#define MWM_INFO_STARTUP_CUSTOM 2
#define _XA_MOTIF_WM_HINTS "_MOTIF_WM_HINTS"
#define _XA_MOTIF_WM_MESSAGES "_MOTIF_WM_MESSAGES"
#define _XA_MOTIF_WM_OFFSET "_MOTIF_WM_OFFSET"
#define _XA_MOTIF_WM_MENU "_MOTIF_WM_MENU"
#define _XA_MOTIF_WM_INFO "_MOTIF_WM_INFO"
#define _XA_MWM_HINTS _XA_MOTIF_WM_HINTS
#define _XA_MWM_MESSAGES _XA_MOTIF_WM_MESSAGES
#define _XA_MWM_MENU _XA_MOTIF_WM_MENU
#define _XA_MWM_INFO _XA_MOTIF_WM_INFO
#endif
/* __WINE_MWM_H */
dlls/x11drv/window.c
View file @
77e7fd7a
...
...
@@ -26,6 +26,7 @@
#include "dce.h"
#include "options.h"
#include "hook.h"
#include "mwm.h"
DEFAULT_DEBUG_CHANNEL
(
x11drv
);
...
...
@@ -44,6 +45,7 @@ Atom wmTakeFocus = None;
Atom
dndProtocol
=
None
;
Atom
dndSelection
=
None
;
Atom
wmChangeState
=
None
;
Atom
mwmHints
=
None
;
Atom
kwmDockWindow
=
None
;
Atom
_kde_net_wm_system_tray_window_for
=
None
;
/* KDE 2 Final */
...
...
@@ -366,13 +368,38 @@ static void set_wm_hints( Display *display, WND *win )
{
int
val
=
1
;
if
(
kwmDockWindow
!=
None
)
TS
XChangeProperty
(
display
,
data
->
whole_window
,
kwmDockWindow
,
kwmDockWindow
,
XChangeProperty
(
display
,
data
->
whole_window
,
kwmDockWindow
,
kwmDockWindow
,
32
,
PropModeReplace
,
(
char
*
)
&
val
,
1
);
if
(
_kde_net_wm_system_tray_window_for
!=
None
)
TS
XChangeProperty
(
display
,
data
->
whole_window
,
_kde_net_wm_system_tray_window_for
,
XChangeProperty
(
display
,
data
->
whole_window
,
_kde_net_wm_system_tray_window_for
,
XA_WINDOW
,
32
,
PropModeReplace
,
(
char
*
)
&
data
->
whole_window
,
1
);
}
if
(
mwmHints
!=
None
)
{
MwmHints
mwm_hints
;
mwm_hints
.
flags
=
MWM_HINTS_FUNCTIONS
|
MWM_HINTS_DECORATIONS
;
mwm_hints
.
functions
=
0
;
if
((
win
->
dwStyle
&
WS_CAPTION
)
==
WS_CAPTION
)
mwm_hints
.
functions
|=
MWM_FUNC_MOVE
;
if
(
win
->
dwStyle
&
WS_THICKFRAME
)
mwm_hints
.
functions
|=
MWM_FUNC_MOVE
|
MWM_FUNC_RESIZE
;
if
(
win
->
dwStyle
&
WS_MINIMIZE
)
mwm_hints
.
functions
|=
MWM_FUNC_MINIMIZE
;
if
(
win
->
dwStyle
&
WS_MAXIMIZE
)
mwm_hints
.
functions
|=
MWM_FUNC_MAXIMIZE
;
if
(
win
->
dwStyle
&
WS_SYSMENU
)
mwm_hints
.
functions
|=
MWM_FUNC_CLOSE
;
mwm_hints
.
decorations
=
0
;
if
((
win
->
dwStyle
&
WS_CAPTION
)
==
WS_CAPTION
)
mwm_hints
.
decorations
|=
MWM_DECOR_TITLE
;
if
(
win
->
dwExStyle
&
WS_EX_DLGMODALFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
win
->
dwStyle
&
WS_THICKFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
|
MWM_DECOR_RESIZEH
;
else
if
((
win
->
dwStyle
&
(
WS_DLGFRAME
|
WS_BORDER
))
==
WS_DLGFRAME
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
win
->
dwStyle
&
WS_BORDER
)
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
else
if
(
!
(
win
->
dwStyle
&
(
WS_CHILD
|
WS_POPUP
)))
mwm_hints
.
decorations
|=
MWM_DECOR_BORDER
;
if
(
win
->
dwStyle
&
WS_SYSMENU
)
mwm_hints
.
decorations
|=
MWM_DECOR_MENU
;
if
(
win
->
dwStyle
&
WS_MINIMIZE
)
mwm_hints
.
decorations
|=
MWM_DECOR_MINIMIZE
;
if
(
win
->
dwStyle
&
WS_MAXIMIZE
)
mwm_hints
.
decorations
|=
MWM_DECOR_MAXIMIZE
;
XChangeProperty
(
display
,
data
->
whole_window
,
mwmHints
,
mwmHints
,
32
,
PropModeReplace
,
(
char
*
)
&
mwm_hints
,
sizeof
(
mwm_hints
)
/
sizeof
(
long
)
);
}
wine_tsx11_unlock
();
/* wm hints */
...
...
@@ -600,7 +627,8 @@ static void create_desktop( Display *display, WND *wndPtr, CREATESTRUCTA *cs )
wmTakeFocus
=
0
;
/* not yet */
dndProtocol
=
XInternAtom
(
display
,
"DndProtocol"
,
False
);
dndSelection
=
XInternAtom
(
display
,
"DndSelection"
,
False
);
wmChangeState
=
XInternAtom
(
display
,
"WM_CHANGE_STATE"
,
False
);
wmChangeState
=
XInternAtom
(
display
,
"WM_CHANGE_STATE"
,
False
);
mwmHints
=
XInternAtom
(
display
,
_XA_MWM_HINTS
,
False
);
kwmDockWindow
=
XInternAtom
(
display
,
"KWM_DOCKWINDOW"
,
False
);
_kde_net_wm_system_tray_window_for
=
XInternAtom
(
display
,
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR"
,
False
);
wine_tsx11_unlock
();
...
...
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