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
34dd455f
Commit
34dd455f
authored
May 04, 2003
by
Mike Hearn
Committed by
Alexandre Julliard
May 04, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support _NET_WM_PING protocol so the WM can detect freezes.
parent
c5bb7303
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
event.c
dlls/x11drv/event.c
+10
-0
window.c
dlls/x11drv/window.c
+12
-0
No files found.
dlls/x11drv/event.c
View file @
34dd455f
...
...
@@ -55,6 +55,7 @@ extern Atom wmProtocols;
extern
Atom
wmDeleteWindow
;
extern
Atom
dndProtocol
;
extern
Atom
dndSelection
;
extern
Atom
netwmPing
;
#define DndNotDnd -1
/* OffiX drag&drop */
#define DndUnknown 0
...
...
@@ -460,6 +461,15 @@ static void handle_wm_protocols_message( HWND hwnd, XClientMessageEvent *event )
if
(
!
hwnd
)
hwnd
=
last_focus
;
if
(
hwnd
&&
can_activate_window
(
hwnd
))
set_focus
(
hwnd
,
event_time
);
}
}
else
if
(
protocol
==
netwmPing
)
{
XClientMessageEvent
xev
;
xev
=
*
event
;
TRACE
(
"NET_WM Ping
\n
"
);
xev
.
window
=
DefaultRootWindow
(
xev
.
display
);
XSendEvent
(
xev
.
display
,
xev
.
window
,
False
,
SubstructureRedirectMask
|
SubstructureNotifyMask
,
(
XEvent
*
)
&
xev
);
/* this line is semi-stolen from gtk2 */
TRACE
(
"NET_WM Pong
\n
"
);
}
}
...
...
dlls/x11drv/window.c
View file @
34dd455f
...
...
@@ -23,6 +23,7 @@
#include "config.h"
#include <stdlib.h>
#include <unistd.h>
#include "ts_xlib.h"
#include <X11/Xresource.h>
...
...
@@ -59,6 +60,8 @@ Atom dndSelection = None;
Atom
wmChangeState
=
None
;
Atom
mwmHints
=
None
;
Atom
kwmDockWindow
=
None
;
Atom
netwmPid
=
None
;
Atom
netwmPing
=
None
;
Atom
_kde_net_wm_system_tray_window_for
=
None
;
/* KDE 2 Final */
static
LPCSTR
whole_window_atom
;
...
...
@@ -338,6 +341,7 @@ void X11DRV_set_wm_hints( Display *display, WND *win )
i
=
0
;
protocols
[
i
++
]
=
wmDeleteWindow
;
if
(
wmTakeFocus
)
protocols
[
i
++
]
=
wmTakeFocus
;
if
(
netwmPing
)
protocols
[
i
++
]
=
netwmPing
;
XSetWMProtocols
(
display
,
data
->
whole_window
,
protocols
,
i
);
/* class hints */
...
...
@@ -373,6 +377,12 @@ void X11DRV_set_wm_hints( Display *display, WND *win )
XA_WINDOW
,
32
,
PropModeReplace
,
(
char
*
)
&
data
->
whole_window
,
1
);
}
/* set the WM_CLIENT_MACHINE and WM_LOCALE_NAME properties */
XSetWMProperties
(
display
,
data
->
whole_window
,
NULL
,
NULL
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
/* set the pid. together, these properties are needed so the window manager can kill us if we freeze */
i
=
getpid
();
XChangeProperty
(
display
,
data
->
whole_window
,
netwmPid
,
XA_CARDINAL
,
32
,
PropModeReplace
,
(
char
*
)
&
i
,
1
);
if
(
mwmHints
!=
None
)
{
MwmHints
mwm_hints
;
...
...
@@ -627,6 +637,8 @@ static void create_desktop( Display *display, WND *wndPtr )
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
);
netwmPid
=
XInternAtom
(
display
,
"_NET_WM_PID"
,
False
);
netwmPing
=
XInternAtom
(
display
,
"_NET_WM_PING"
,
False
);
wine_tsx11_unlock
();
whole_window_atom
=
MAKEINTATOMA
(
GlobalAddAtomA
(
"__wine_x11_whole_window"
));
...
...
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