[gnome-shell] Revert "Add an OSD for sticky modifiers"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Revert "Add an OSD for sticky modifiers"
- Date: Mon, 15 Apr 2013 22:39:46 +0000 (UTC)
commit b4590da68620d2ba9cc4def7f63893dad3434295
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 15 18:39:52 2013 -0400
Revert "Add an OSD for sticky modifiers"
This reverts commit 96994721ef38d330dae2ffc0101a83322b312117.
js/Makefile.am | 1 -
js/ui/main.js | 3 --
js/ui/xkbHandler.js | 72 ----------------------------------------------
src/gnome-shell-plugin.c | 32 ---------------------
src/shell-global-private.h | 3 --
src/shell-global.c | 38 ------------------------
6 files changed, 149 deletions(-)
---
diff --git a/js/Makefile.am b/js/Makefile.am
index b294dbe..62c8323 100644
--- a/js/Makefile.am
+++ b/js/Makefile.am
@@ -105,7 +105,6 @@ nobase_dist_js_DATA = \
ui/workspacesView.js \
ui/workspaceSwitcherPopup.js \
ui/xdndHandler.js \
- ui/xkbHandler.js \
ui/components/__init__.js \
ui/components/autorunManager.js \
ui/components/automountManager.js \
diff --git a/js/ui/main.js b/js/ui/main.js
index 3ca0901..f438114 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -36,7 +36,6 @@ const ShellMountOperation = imports.ui.shellMountOperation;
const WindowManager = imports.ui.windowManager;
const Magnifier = imports.ui.magnifier;
const XdndHandler = imports.ui.xdndHandler;
-const XkbHandler = imports.ui.xkbHandler;
const Util = imports.misc.util;
const OVERRIDES_SCHEMA = 'org.gnome.shell.overrides';
@@ -64,7 +63,6 @@ let modalActorFocusStack = [];
let uiGroup = null;
let magnifier = null;
let xdndHandler = null;
-let xkbHandler = null;
let keyboard = null;
let layoutManager = null;
let _startDate;
@@ -141,7 +139,6 @@ function _initializeUI() {
uiGroup = layoutManager.uiGroup;
xdndHandler = new XdndHandler.XdndHandler();
- xkbHandler = new XkbHandler.XkbHandler();
ctrlAltTabManager = new CtrlAltTab.CtrlAltTabManager();
osdWindow = new OsdWindow.OsdWindow();
overview = new Overview.Overview();
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
index 96ac9cc..3470637 100644
--- a/src/gnome-shell-plugin.c
+++ b/src/gnome-shell-plugin.c
@@ -35,7 +35,6 @@
#include <gjs/gjs.h>
#include <meta/display.h>
#include <meta/meta-plugin.h>
-#include <X11/XKBlib.h>
#include "shell-global-private.h"
#include "shell-perf-log.h"
@@ -102,9 +101,6 @@ struct _GnomeShellPlugin
guint have_swap_event : 1;
CoglContext *cogl_context;
- int xkb_event_base;
- XkbDescPtr xkb;
-
ShellGlobal *global;
};
@@ -191,10 +187,6 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
int status;
GjsContext *gjs_context;
ClutterBackend *backend;
- MetaScreen *screen;
- MetaDisplay *display;
- Display *xdisplay;
- int xkb_base_error_type, xkb_opcode;
backend = clutter_get_default_backend ();
shell_plugin->cogl_context = clutter_backend_get_cogl_context (backend);
@@ -207,26 +199,6 @@ gnome_shell_plugin_start (MetaPlugin *plugin)
"GL buffer swap complete event received (with timestamp of completion)",
"x");
- screen = meta_plugin_get_screen (META_PLUGIN (shell_plugin));
- display = meta_screen_get_display (screen);
- xdisplay = meta_display_get_xdisplay (display);
- if (!XkbQueryExtension (xdisplay, &xkb_opcode,
- &shell_plugin->xkb_event_base,
- &xkb_base_error_type,
- NULL, NULL))
- {
- shell_plugin->xkb_event_base = -1;
- g_message ("could not find XKB extension.");
- }
- else
- {
- shell_plugin->xkb = XkbGetMap (xdisplay,
- XkbAllComponentsMask,
- XkbUseCoreKbd);
- XkbSelectEvents (xdisplay, XkbUseCoreKbd,
- XkbAllEventsMask, XkbAllEventsMask);
- }
-
shell_plugin->global = shell_global_get ();
_shell_global_set_plugin (shell_plugin->global, META_PLUGIN (shell_plugin));
@@ -417,10 +389,6 @@ gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
if (_shell_global_check_xdnd_event (shell_plugin->global, xev))
return TRUE;
- if (xev->type == shell_plugin->xkb_event_base &&
- _shell_global_check_xkb_event (shell_plugin->global, xev))
- return TRUE;
-
return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
}
diff --git a/src/shell-global-private.h b/src/shell-global-private.h
index f681228..786719f 100644
--- a/src/shell-global-private.h
+++ b/src/shell-global-private.h
@@ -16,7 +16,4 @@ GjsContext *_shell_global_get_gjs_context (ShellGlobal *global);
gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
XEvent *xev);
-gboolean _shell_global_check_xkb_event (ShellGlobal *global,
- XEvent *xev);
-
#endif /* __SHELL_GLOBAL_PRIVATE_H__ */
diff --git a/src/shell-global.c b/src/shell-global.c
index c80df4f..889e146 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -16,7 +16,6 @@
#include <locale.h>
#include <X11/extensions/Xfixes.h>
-#include <X11/XKBlib.h>
#include <canberra.h>
#include <canberra-gtk.h>
#include <clutter/glx/clutter-glx.h>
@@ -123,7 +122,6 @@ enum
XDND_POSITION_CHANGED,
XDND_LEAVE,
XDND_ENTER,
- XKB_STATE_CHANGED,
NOTIFY_ERROR,
LAST_SIGNAL
};
@@ -340,15 +338,6 @@ shell_global_class_init (ShellGlobalClass *klass)
NULL, NULL, NULL,
G_TYPE_NONE, 0);
- shell_global_signals[XKB_STATE_CHANGED] =
- g_signal_new ("xkb-state-changed",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 2,
- G_TYPE_UINT, G_TYPE_UINT);
-
shell_global_signals[NOTIFY_ERROR] =
g_signal_new ("notify-error",
G_TYPE_FROM_CLASS (klass),
@@ -1790,30 +1779,3 @@ shell_global_get_session_mode (ShellGlobal *global)
return global->session_mode;
}
-
-static void
-notify_xkb_state (ShellGlobal *global,
- XkbStateNotifyEvent *event)
-{
- if (event->changed & (XkbModifierLatchMask | XkbModifierLockMask))
- g_signal_emit_by_name (G_OBJECT (global), "xkb-state-changed",
- event->latched_mods, event->locked_mods);
-}
-
-gboolean
-_shell_global_check_xkb_event (ShellGlobal *global,
- XEvent *event)
-{
- XkbEvent *xkb_event = (XkbEvent *)event;
-
- switch (xkb_event->any.xkb_type)
- {
- case XkbStateNotify:
- notify_xkb_state (global, &xkb_event->state);
- break;
- default:
- break;
- }
-
- return FALSE;
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]