mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
wmaker: Moved variables for the Xkb extension into the global namespace
This commit is contained in:
committed by
Carlos R. Mafra
parent
81aa311c42
commit
3995130b79
@@ -579,6 +579,13 @@ extern struct wmaker_global_variables {
|
|||||||
} shape;
|
} shape;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef KEEP_XKB_LOCK_STATUS
|
||||||
|
struct {
|
||||||
|
Bool supported;
|
||||||
|
int event_base;
|
||||||
|
} xkb;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If no extension were activated, we would end up with an empty
|
* If no extension were activated, we would end up with an empty
|
||||||
* structure, which old compilers may not appreciate, so let's
|
* structure, which old compilers may not appreciate, so let's
|
||||||
|
|||||||
@@ -81,10 +81,6 @@ extern WShortKey wKeyBindings[WKBD_LAST];
|
|||||||
|
|
||||||
#define MOD_MASK wPreferences.modifier_mask
|
#define MOD_MASK wPreferences.modifier_mask
|
||||||
|
|
||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
|
||||||
extern int wXkbEventBase;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/************ Local stuff ***********/
|
/************ Local stuff ***********/
|
||||||
|
|
||||||
static void saveTimestamp(XEvent *event);
|
static void saveTimestamp(XEvent *event);
|
||||||
@@ -551,7 +547,7 @@ static void handleExtensions(XEvent * event)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
#ifdef KEEP_XKB_LOCK_STATUS
|
||||||
if (wPreferences.modelock && (xkbevent->type == wXkbEventBase)) {
|
if (wPreferences.modelock && (xkbevent->type == w_global.xext.xkb.event_base)) {
|
||||||
handleXkbIndicatorStateNotify(event);
|
handleXkbIndicatorStateNotify(event);
|
||||||
}
|
}
|
||||||
#endif /*KEEP_XKB_LOCK_STATUS */
|
#endif /*KEEP_XKB_LOCK_STATUS */
|
||||||
|
|||||||
@@ -88,11 +88,6 @@ WDDomain *WDWindowMaker = NULL;
|
|||||||
WDDomain *WDWindowAttributes = NULL;
|
WDDomain *WDWindowAttributes = NULL;
|
||||||
WDDomain *WDRootMenu = NULL;
|
WDDomain *WDRootMenu = NULL;
|
||||||
|
|
||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
|
||||||
Bool wXkbSupported;
|
|
||||||
int wXkbEventBase;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* special flags */
|
/* special flags */
|
||||||
char WDelayedActionSet = 0;
|
char WDelayedActionSet = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -71,10 +71,6 @@
|
|||||||
|
|
||||||
/**** Global variables ****/
|
/**** Global variables ****/
|
||||||
|
|
||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
|
||||||
extern int wXkbSupported;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_XRANDR
|
#ifdef HAVE_XRANDR
|
||||||
Bool has_randr;
|
Bool has_randr;
|
||||||
int randr_event_base;
|
int randr_event_base;
|
||||||
@@ -548,7 +544,7 @@ WScreen *wScreenInit(int screen_number)
|
|||||||
/* Only GroupLock doesn't work correctly in my system since right-alt
|
/* Only GroupLock doesn't work correctly in my system since right-alt
|
||||||
* can change mode while holding it too - ]d
|
* can change mode while holding it too - ]d
|
||||||
*/
|
*/
|
||||||
if (wXkbSupported) {
|
if (w_global.xext.xkb.supported) {
|
||||||
XkbSelectEvents(dpy, XkbUseCoreKbd, XkbStateNotifyMask, XkbStateNotifyMask);
|
XkbSelectEvents(dpy, XkbUseCoreKbd, XkbStateNotifyMask, XkbStateNotifyMask);
|
||||||
}
|
}
|
||||||
#endif /* KEEP_XKB_LOCK_STATUS */
|
#endif /* KEEP_XKB_LOCK_STATUS */
|
||||||
|
|||||||
@@ -90,11 +90,6 @@ extern WDDomain *WDRootMenu;
|
|||||||
extern WDDomain *WDWindowAttributes;
|
extern WDDomain *WDWindowAttributes;
|
||||||
extern WShortKey wKeyBindings[WKBD_LAST];
|
extern WShortKey wKeyBindings[WKBD_LAST];
|
||||||
|
|
||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
|
||||||
extern Bool wXkbSupported;
|
|
||||||
extern int wXkbEventBase;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_INOTIFY
|
#ifndef HAVE_INOTIFY
|
||||||
/* special flags */
|
/* special flags */
|
||||||
extern char WDelayedActionSet;
|
extern char WDelayedActionSet;
|
||||||
@@ -636,8 +631,8 @@ void StartUp(Bool defaultScreenOnly)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KEEP_XKB_LOCK_STATUS
|
#ifdef KEEP_XKB_LOCK_STATUS
|
||||||
wXkbSupported = XkbQueryExtension(dpy, NULL, &wXkbEventBase, NULL, NULL, NULL);
|
w_global.xext.xkb.supported = XkbQueryExtension(dpy, NULL, &w_global.xext.xkb.event_base, NULL, NULL, NULL);
|
||||||
if (wPreferences.modelock && !wXkbSupported) {
|
if (wPreferences.modelock && !w_global.xext.xkb.supported) {
|
||||||
wwarning(_("XKB is not supported. KbdModeLock is automatically disabled."));
|
wwarning(_("XKB is not supported. KbdModeLock is automatically disabled."));
|
||||||
wPreferences.modelock = 0;
|
wPreferences.modelock = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user