Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yoann Laissus
wine
Commits
77e7fd7a
Commit
77e7fd7a
authored
23 years ago
by
Ove Kåven
Committed by
Alexandre Julliard
23 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added support for MWM hints.
parent
b508a1da
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/x11drv/mwm.h
+65
-0
65 additions, 0 deletions
dlls/x11drv/mwm.h
dlls/x11drv/window.c
+33
-5
33 additions, 5 deletions
dlls/x11drv/window.c
with
98 additions
and
5 deletions
dlls/x11drv/mwm.h
0 → 100644
+
65
−
0
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 */
This diff is collapsed.
Click to expand it.
dlls/x11drv/window.c
+
33
−
5
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,11 +368,36 @@ static void set_wm_hints( Display *display, WND *win )
{
int
val
=
1
;
if
(
kwmDockWindow
!=
None
)
TS
XChangeProperty
(
display
,
data
->
whole_window
,
kwmDockWindow
,
kwmDockWindow
,
32
,
PropModeReplace
,
(
char
*
)
&
val
,
1
);
XChangeProperty
(
display
,
data
->
whole_window
,
kwmDockWindow
,
kwmDockWindow
,
32
,
PropModeReplace
,
(
char
*
)
&
val
,
1
);
if
(
_kde_net_wm_system_tray_window_for
!=
None
)
TSXChangeProperty
(
display
,
data
->
whole_window
,
_kde_net_wm_system_tray_window_for
,
XA_WINDOW
,
32
,
PropModeReplace
,
(
char
*
)
&
data
->
whole_window
,
1
);
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
();
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment