summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2019-07-10 15:12:38 +0200
committerraveit65 <[email protected]>2019-08-06 14:42:06 +0200
commitb689b96493def9086e935292bc4615b910548c0d (patch)
treea4caca2e9d187eaaa14710ce15e081af1d636ae1 /src
parent2c8cadd7e80a169b4816edc12741141fe6a27d86 (diff)
downloadmate-screensaver-b689b96493def9086e935292bc4615b910548c0d.tar.bz2
mate-screensaver-b689b96493def9086e935292bc4615b910548c0d.tar.xz
drop libXxf86 dependency
The X server hasn't implemented it in over 10 years. and it was dropped from debian since a long time. fixes https://github.com/mate-desktop/mate-screensaver/issues/199
Diffstat (limited to 'src')
-rw-r--r--src/gs-grab-x11.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/gs-grab-x11.c b/src/gs-grab-x11.c
index 9fff12d..df95c5a 100644
--- a/src/gs-grab-x11.c
+++ b/src/gs-grab-x11.c
@@ -29,10 +29,6 @@
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
-#ifdef HAVE_XF86MISCSETGRABKEYSSTATE
-# include <X11/extensions/xf86misc.h>
-#endif /* HAVE_XF86MISCSETGRABKEYSSTATE */
-
#include "gs-window.h"
#include "gs-grab.h"
#include "gs-debug.h"
@@ -83,75 +79,11 @@ grab_string (int status)
}
}
-#ifdef HAVE_XF86MISCSETGRABKEYSSTATE
-/* This function enables and disables the Ctrl-Alt-KP_star and
- Ctrl-Alt-KP_slash hot-keys, which (in XFree86 4.2) break any
- grabs and/or kill the grabbing client. That would effectively
- unlock the screen, so we don't like that.
-
- The Ctrl-Alt-KP_star and Ctrl-Alt-KP_slash hot-keys only exist
- if AllowDeactivateGrabs and/or AllowClosedownGrabs are turned on
- in XF86Config. I believe they are disabled by default.
-
- This does not affect any other keys (specifically Ctrl-Alt-BS or
- Ctrl-Alt-F1) but I wish it did. Maybe it will someday.
- */
-static void
-xorg_lock_smasher_set_active (GSGrab *grab,
- gboolean active)
-{
- int status, event, error;
- GdkDisplay *display;
-
- display = gdk_display_get_default ();
-
- if (!XF86MiscQueryExtension (GDK_DISPLAY_XDISPLAY (display), &event, &error))
- {
- gs_debug ("No XFree86-Misc extension present");
- return;
- }
-
- if (active)
- {
- gs_debug ("Enabling the x.org grab smasher");
- }
- else
- {
- gs_debug ("Disabling the x.org grab smasher");
- }
-
- gdk_x11_display_error_trap_push (display);
-
- status = XF86MiscSetGrabKeysState (GDK_DISPLAY_XDISPLAY (display), active);
-
- gdk_display_sync (display);
- error = gdk_x11_display_error_trap_pop (display);
-
- if (active && status == MiscExtGrabStateAlready)
- {
- /* shut up, consider this success */
- status = MiscExtGrabStateSuccess;
- }
-
- if (error == Success) {
- gs_debug ("XF86MiscSetGrabKeysState(%s) returned %s\n",
- active ? "on" : "off",
- (status == MiscExtGrabStateSuccess ? "MiscExtGrabStateSuccess" :
- status == MiscExtGrabStateLocked ? "MiscExtGrabStateLocked" :
- status == MiscExtGrabStateAlready ? "MiscExtGrabStateAlready" :
- "unknown value"));
- } else {
- gs_debug ("XF86MiscSetGrabKeysState(%s) failed with error code %d\n",
- active ? "on" : "off", error);
- }
-}
-#else
static void
xorg_lock_smasher_set_active (GSGrab *grab,
gboolean active)
{
}
-#endif /* HAVE_XF86MISCSETGRABKEYSSTATE */
static void
prepare_window_grab_cb (GdkSeat *seat,