gnome-session/gnome-session-2.12.0-xgl-display-modal-2.patch

67 lines
1.8 KiB
Diff
Raw Normal View History

diff -ur ../gnome-session-2.12.0/gnome-session/logout.c ./gnome-session/logout.c
--- ../gnome-session-2.12.0/gnome-session/logout.c 2005-05-06 12:17:12.000000000 +0200
+++ ./gnome-session/logout.c 2006-01-07 06:28:42.000000000 +0100
@@ -26,6 +26,9 @@
#include <gtk/gtkinvisible.h>
#include <gdk/gdkx.h>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+
#include <gconf/gconf-client.h>
#include <libgnome/libgnome.h>
@@ -187,6 +190,10 @@
int attr_mask;
GdkGCValues values;
FadeoutData *fadeout;
+ GdkAtom property = gdk_atom_intern ("_NET_WM_STATE_DISPLAY_MODAL", FALSE);
+
+ if (gdk_x11_screen_supports_net_wm_hint (screen, property))
+ return;
fadeout = g_new (FadeoutData, 1);
@@ -491,12 +498,31 @@
*/
if (!a11y_enabled)
{
- XGrabServer (GDK_DISPLAY ());
+ /* Really necessary?
+ XGrabServer (GDK_DISPLAY ());
+ */
gsm_foreach_screen (fadeout_screen);
}
gtk_widget_show_all (box);
+ /* XXX: Appending experimental display modal state */
+ {
+ Display *xdisplay = GDK_WINDOW_XDISPLAY (box->window);
+ Window xwindow = GDK_WINDOW_XID (box->window);
+ Atom state_atom, display_modal_atom;
+
+ state_atom = XInternAtom (xdisplay, "_NET_WM_STATE", 0);
+ display_modal_atom = XInternAtom (xdisplay,
+ "_NET_WM_STATE_DISPLAY_MODAL", 0);
+
+ XChangeProperty (xdisplay,
+ xwindow,
+ state_atom,
+ XA_ATOM, 32, PropModeAppend,
+ (guchar *) &display_modal_atom, 1);
+ }
+
if (!a11y_enabled)
{
/* Move the grabs to our message box */
@@ -533,7 +559,7 @@
if (!a11y_enabled)
{
hide_fadeout_windows ();
- XUngrabServer (GDK_DISPLAY ());
+ /* XUngrabServer (GDK_DISPLAY ()); */
gdk_pointer_ungrab (GDK_CURRENT_TIME);
gdk_keyboard_ungrab (GDK_CURRENT_TIME);