69 lines
2.3 KiB
Diff
69 lines
2.3 KiB
Diff
From 78d0652ac33b774c824eaeff82d504e4fe618176 Mon Sep 17 00:00:00 2001
|
|
From: Olivier Fourdan <ofourdan@redhat.com>
|
|
Date: Wed, 17 Mar 2021 14:11:28 +0100
|
|
Subject: [PATCH] xfixes: Add ClientDisconnectMode
|
|
|
|
The Xserver itself is capable of terminating itself once all X11 clients
|
|
are gone, yet in a typical full session, there are a number of X11
|
|
clients running continuously (e.g. the Xsettings daemon, IBus, etc.).
|
|
|
|
Those always-running clients will prevent the Xserver from terminating,
|
|
because the actual number of X11 clients will never drop to 0.
|
|
|
|
To solve this issue directly at the Xserver level, this add new entries
|
|
to the XFixes extension to let the X11 clients themselves specify the
|
|
disconnect mode they expect.
|
|
|
|
Typically, those X11 daemon clients would specify the disconnect mode
|
|
XFixesClientDisconnectFlagTerminate to let the Xserver know that they
|
|
should not be accounted for when checking the remaining clients prior
|
|
to terminate.
|
|
|
|
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
|
|
Reviewed-by: Simon Ser <contact@emersion.fr>
|
|
---
|
|
src/xfixes.xml | 22 +++++++++++++++++++++-
|
|
1 file changed, 21 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/xfixes.xml b/src/xfixes.xml
|
|
index 0a3d5ff..a01cd7b 100644
|
|
--- a/src/xfixes.xml
|
|
+++ b/src/xfixes.xml
|
|
@@ -26,7 +26,7 @@ authorization from the authors.
|
|
-->
|
|
<!-- This file describes version 4 of XFixes. -->
|
|
<xcb header="xfixes" extension-xname="XFIXES" extension-name="XFixes"
|
|
- major-version="5" minor-version="0">
|
|
+ major-version="6" minor-version="0">
|
|
<import>xproto</import>
|
|
<import>render</import>
|
|
<import>shape</import>
|
|
@@ -359,4 +359,24 @@ authorization from the authors.
|
|
<request name="DeletePointerBarrier" opcode="32">
|
|
<field type="BARRIER" name="barrier" />
|
|
</request>
|
|
+
|
|
+ <!-- Version 6 -->
|
|
+
|
|
+ <enum name="ClientDisconnectFlags">
|
|
+ <item name="Default"><value>0</value></item>
|
|
+ <item name="Terminate"><bit>0</bit></item>
|
|
+ </enum>
|
|
+
|
|
+ <request name="SetClientDisconnectMode" opcode="33">
|
|
+ <field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
|
|
+ </request>
|
|
+
|
|
+ <request name="GetClientDisconnectMode" opcode="34">
|
|
+ <reply>
|
|
+ <pad bytes="1" />
|
|
+ <field type="CARD32" name="disconnect_mode" mask="ClientDisconnectFlags" />
|
|
+ <pad bytes="20" />
|
|
+ </reply>
|
|
+ </request>
|
|
+
|
|
</xcb>
|
|
--
|
|
2.39.0.windows.2
|
|
|