sync with bb-cvs.
Add option in config menu for disabling mouse input with scroll lock. Remove compile-time flag for event clobbering since this solves that problem for now.
This commit is contained in:
parent
54c495c83c
commit
bd7f948159
31 changed files with 79 additions and 134 deletions
36
configure.in
36
configure.in
|
@ -112,24 +112,6 @@ if test x$XFT = "xyes"; then
|
||||||
AC_DEFINE(XFT,1,Enable support of the Xft extension)
|
AC_DEFINE(XFT,1,Enable support of the Xft extension)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check for the Slit
|
|
||||||
SLIT=""
|
|
||||||
AC_MSG_CHECKING([whether to include the Slit])
|
|
||||||
AC_ARG_ENABLE(
|
|
||||||
slit, [ --enable-slit include code for the Slit [default=yes]],
|
|
||||||
if test x$enableval = "xyes"; then
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
SLIT="yes"
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
fi,
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
SLIT="yes"
|
|
||||||
)
|
|
||||||
if test x$SLIT = "xyes"; then
|
|
||||||
AC_DEFINE(SLIT,1,Enable the Slit)
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check for ordered 8bpp dithering
|
dnl Check for ordered 8bpp dithering
|
||||||
ORDEREDPSEUDO=""
|
ORDEREDPSEUDO=""
|
||||||
AC_MSG_CHECKING([whether to include Pseudocolor ordered dithering code])
|
AC_MSG_CHECKING([whether to include Pseudocolor ordered dithering code])
|
||||||
|
@ -148,24 +130,6 @@ if test x$ORDEREDPSEUDO = "xyes"; then
|
||||||
AC_DEFINE(ORDEREDPSEUDO,1,Enable pseudocolor ordered dithering)
|
AC_DEFINE(ORDEREDPSEUDO,1,Enable pseudocolor ordered dithering)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check for event clobbering
|
|
||||||
CLOBBER=""
|
|
||||||
AC_MSG_CHECKING([whether to intercept mouse events to clients])
|
|
||||||
AC_ARG_ENABLE(clobber,
|
|
||||||
[ --enable-clobber intercept mouse events to clients when num lock
|
|
||||||
or scroll lock are on [default=yes]],
|
|
||||||
if test x$enableval = "xno"; then
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
CLOBBER="no"
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
fi,
|
|
||||||
AC_MSG_RESULT([yes])
|
|
||||||
)
|
|
||||||
if test x$CLOBBER = "xno"; then
|
|
||||||
AC_DEFINE(NOCLOBBER,1,Disable grabbing of mouse events when num/scoll lock is pressed)
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Check whether to include debugging code
|
dnl Check whether to include debugging code
|
||||||
DEBUG=""
|
DEBUG=""
|
||||||
AC_MSG_CHECKING([whether to include verbose debugging code])
|
AC_MSG_CHECKING([whether to include verbose debugging code])
|
||||||
|
|
|
@ -20,6 +20,8 @@ $ #WindowToWindowSnap
|
||||||
# Window-To-Window Snapping
|
# Window-To-Window Snapping
|
||||||
$ #WindowCornerSnap
|
$ #WindowCornerSnap
|
||||||
# Window Corner Snapping
|
# Window Corner Snapping
|
||||||
|
$ #DisableBindings
|
||||||
|
# Disable Mouse with Scroll Lock
|
||||||
$ #HideToolbar
|
$ #HideToolbar
|
||||||
# Hide Toolbar
|
# Hide Toolbar
|
||||||
$ #ClickToFocus
|
$ #ClickToFocus
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Compile time options:\n\
|
# Compile time options:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -16,6 +16,8 @@ $ #FocusNew
|
||||||
# Fokus nyt vindue
|
# Fokus nyt vindue
|
||||||
$ #FocusLast
|
$ #FocusLast
|
||||||
# Fokus vindue ved skrivebords ændring
|
# Fokus vindue ved skrivebords ændring
|
||||||
|
$ #DisableBindings
|
||||||
|
# Deaktiver tastebindinger med Scroll Lock
|
||||||
$ #ClickToFocus
|
$ #ClickToFocus
|
||||||
# Klik for fokus
|
# Klik for fokus
|
||||||
$ #SloppyFocus
|
$ #SloppyFocus
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Kompileret med:\n\
|
# Kompileret med:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Optionen zum Kompilationszeitpunkt:\n\
|
# Optionen zum Kompilationszeitpunkt:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Opciones durante la compilación:\n\
|
# Opciones durante la compilación:\n\
|
||||||
Información extra para depuración: %s\n\
|
Información extra para depuración: %s\n\
|
||||||
Forma: %s\n\
|
Forma: %s\n\
|
||||||
Slit: %s\n\
|
|
||||||
Event Clobbering: %s\n\
|
|
||||||
8bpp simulación ordenada de colores en imágenes: %s\n\n
|
8bpp simulación ordenada de colores en imágenes: %s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Kompileerimisoptsioonid:\n\
|
# Kompileerimisoptsioonid:\n\
|
||||||
Debuggimine\t\t\t%s\n\
|
Debuggimine\t\t\t%s\n\
|
||||||
Kuju:\t\t\t%s\n\
|
Kuju:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp määratud teravustamine:\t%s\n\n
|
8bpp määratud teravustamine:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Options de compilation:\n\
|
# Options de compilation:\n\
|
||||||
Debugage\t\t\t%s\n\
|
Debugage\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Lissage ordonné:\t%s\n\n
|
8bpp Lissage ordonné:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Fordításnál állítható lehetõségek:\n\
|
# Fordításnál állítható lehetõségek:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Opzioni in fase di compilazione:\n\
|
# Opzioni in fase di compilazione:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# コンパイル時オプション:\n\
|
# コンパイル時オプション:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -2,13 +2,16 @@ $set 14 #main
|
||||||
|
|
||||||
$ #RCRequiresArg
|
$ #RCRequiresArg
|
||||||
# error: '-rc' requires an argument\n
|
# error: '-rc' requires an argument\n
|
||||||
|
$ #MENURequiresArg
|
||||||
|
# error: '-menu' requires an argument\n
|
||||||
$ #DISPLAYRequiresArg
|
$ #DISPLAYRequiresArg
|
||||||
# error: '-display' requires an argument\n
|
# error: '-display' requires an argument\n
|
||||||
$ #WarnDisplaySet
|
$ #WarnDisplaySet
|
||||||
# warning: could not set environment variable 'DISPLAY'\n
|
# warning: could not set environment variable 'DISPLAY'\n
|
||||||
$ #Usage
|
$ #Usage
|
||||||
# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\
|
# Openbox %s : (c) 2002 - 2002 Ben Jansens\n\
|
||||||
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
|
2001 - 2002 Sean 'Shaleh' Perry\n\
|
||||||
|
1997 - 2000, 2002 Brad Hughes\n\n\
|
||||||
-display <string>\t\tuse display connection.\n\
|
-display <string>\t\tuse display connection.\n\
|
||||||
-rc <string>\t\t\tuse alternate resource file.\n\
|
-rc <string>\t\t\tuse alternate resource file.\n\
|
||||||
-version\t\t\tdisplay version and exit.\n\
|
-version\t\t\tdisplay version and exit.\n\
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Gecompileerd met instellingen:\n\
|
# Gecompileerd met instellingen:\n\
|
||||||
Debugging: %s\n\
|
Debugging: %s\n\
|
||||||
Shape: %s\n\
|
Shape: %s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering: %s\n\n
|
8bpp Ordered Dithering: %s\n\n
|
||||||
|
|
|
@ -2,13 +2,16 @@ $set 14 #main
|
||||||
|
|
||||||
$ #RCRequiresArg
|
$ #RCRequiresArg
|
||||||
# feil: '-rc' krever et argument\n
|
# feil: '-rc' krever et argument\n
|
||||||
|
$ #MENURequiresArg
|
||||||
|
# feil: '-menu' krever et argument\n
|
||||||
$ #DISPLAYRequiresArg
|
$ #DISPLAYRequiresArg
|
||||||
# feil: '-display' krever et argument\n
|
# feil: '-display' krever et argument\n
|
||||||
$ #WarnDisplaySet
|
$ #WarnDisplaySet
|
||||||
# advarsel: kunne ikke sette 'DISPLAY' miljøvariabelen\n
|
# advarsel: kunne ikke sette 'DISPLAY' miljøvariabelen\n
|
||||||
$ #Usage
|
$ #Usage
|
||||||
# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\
|
# Openbox %s : (c) 2002 - 2002 Ben Jansens\n\
|
||||||
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
|
2001 - 2002 Sean 'Shaleh' Perry\n\
|
||||||
|
1997 - 2000, 2002 Brad Hughes\n\n\
|
||||||
-display <streng>\t\tbruk skjermtilkobling.\n\
|
-display <streng>\t\tbruk skjermtilkobling.\n\
|
||||||
-rc <streng>\t\t\tbrug alternativ ressursfil.\n\
|
-rc <streng>\t\t\tbrug alternativ ressursfil.\n\
|
||||||
-version\t\t\tvis versjonsnummeret og avslutt.\n\
|
-version\t\t\tvis versjonsnummeret og avslutt.\n\
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Opções em tempo de compilação:\n\
|
# Opções em tempo de compilação:\n\
|
||||||
Informações extras para problemas:\t\t\t%s\n\
|
Informações extras para problemas:\t\t\t%s\n\
|
||||||
Forma:\t\t\t%s\n\
|
Forma:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Simulação ordenada de cores em imagens:\t%s\n\n
|
8bpp Simulação ordenada de cores em imagens:\t%s\n\n
|
||||||
|
|
|
@ -2,13 +2,16 @@ $set 14 #main
|
||||||
|
|
||||||
$ #RCRequiresArg
|
$ #RCRequiresArg
|
||||||
# eroare: '-rc' necesita inca un parametru\n
|
# eroare: '-rc' necesita inca un parametru\n
|
||||||
|
$ #MENURequiresArg
|
||||||
|
# eroare: '-menu' necesita inca un parametru\n
|
||||||
$ #DISPLAYRequiresArg
|
$ #DISPLAYRequiresArg
|
||||||
# eroare: '-display' necesita inca un parametru\n
|
# eroare: '-display' necesita inca un parametru\n
|
||||||
$ #WarnDisplaySet
|
$ #WarnDisplaySet
|
||||||
# atentionare: nu am putut crea variabila de mediu 'DISPLAY'\n
|
# atentionare: nu am putut crea variabila de mediu 'DISPLAY'\n
|
||||||
$ #Usage
|
$ #Usage
|
||||||
# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\
|
# Openbox %s : (c) 2002 - 2002 Ben Jansens\n\
|
||||||
\t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
|
2001 - 2002 Sean 'Shaleh' Perry\n\
|
||||||
|
1997 - 2000, 2002 Brad Hughes\n\n\
|
||||||
-display <sir>\t\tconexiunea la ecran.\n\
|
-display <sir>\t\tconexiunea la ecran.\n\
|
||||||
-rc <sir>\t\t\tfisier de configurare.\n\
|
-rc <sir>\t\t\tfisier de configurare.\n\
|
||||||
-version\t\t\tafiseaza versiunea.\n\
|
-version\t\t\tafiseaza versiunea.\n\
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Compile time options:\n\
|
# Compile time options:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Izbire pri prevajanju:\n\
|
# Izbire pri prevajanju:\n\
|
||||||
Razhro¹èevanje\t\t\t%s\n\
|
Razhro¹èevanje\t\t\t%s\n\
|
||||||
Oblika:\t\t\t%s\n\
|
Oblika:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
Osembitno stresanje barv:\t%s\n\n
|
Osembitno stresanje barv:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Kompilerad med:\n\
|
# Kompilerad med:\n\
|
||||||
Avlusning\t\t\t%s\n\
|
Avlusning\t\t\t%s\n\
|
||||||
Form:\t\t\t\t%s\n\
|
Form:\t\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp ordnad dithering:\t%s\n\n
|
8bpp ordnad dithering:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Denetleme seçenekleri :\n\
|
# Denetleme seçenekleri :\n\
|
||||||
Bilgilendirme\t\t\t%s\n\
|
Bilgilendirme\t\t\t%s\n\
|
||||||
Gölgeleme:\t\t\t%s\n\
|
Gölgeleme:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
R8b'e göre týzla:\t%s\n\n
|
R8b'e göre týzla:\t%s\n\n
|
||||||
|
|
|
@ -22,6 +22,4 @@ $ #CompileOptions
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Interlacing:\t\t\t%s\n\
|
Interlacing:\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# ±àÒëÑ¡Ïî:\n\
|
# ±àÒëÑ¡Ïî:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -21,6 +21,4 @@ $ #CompileOptions
|
||||||
# Compile time options:\n\
|
# Compile time options:\n\
|
||||||
Debugging\t\t\t%s\n\
|
Debugging\t\t\t%s\n\
|
||||||
Shape:\t\t\t%s\n\
|
Shape:\t\t\t%s\n\
|
||||||
Slit:\t\t\t\t%s\n\
|
|
||||||
Event Clobbering:\t\t%s\n\
|
|
||||||
8bpp Ordered Dithering:\t%s\n\n
|
8bpp Ordered Dithering:\t%s\n\n
|
||||||
|
|
|
@ -238,7 +238,6 @@ BaseDisplay::BaseDisplay(const char *app_name, const char *dpy_name) {
|
||||||
for (int i = 0; i < ScreenCount(display); ++i)
|
for (int i = 0; i < ScreenCount(display); ++i)
|
||||||
screenInfoList.push_back(ScreenInfo(this, i));
|
screenInfoList.push_back(ScreenInfo(this, i));
|
||||||
|
|
||||||
#ifndef NOCLOBBER
|
|
||||||
NumLockMask = ScrollLockMask = 0;
|
NumLockMask = ScrollLockMask = 0;
|
||||||
|
|
||||||
const XModifierKeymap* const modmap = XGetModifierMapping(display);
|
const XModifierKeymap* const modmap = XGetModifierMapping(display);
|
||||||
|
@ -268,20 +267,16 @@ BaseDisplay::BaseDisplay(const char *app_name, const char *dpy_name) {
|
||||||
MaskList[0] = 0;
|
MaskList[0] = 0;
|
||||||
MaskList[1] = LockMask;
|
MaskList[1] = LockMask;
|
||||||
MaskList[2] = NumLockMask;
|
MaskList[2] = NumLockMask;
|
||||||
MaskList[3] = ScrollLockMask;
|
MaskList[3] = LockMask | NumLockMask;
|
||||||
MaskList[4] = LockMask | NumLockMask;
|
MaskList[4] = ScrollLockMask;
|
||||||
MaskList[5] = NumLockMask | ScrollLockMask;
|
MaskList[5] = ScrollLockMask | LockMask;
|
||||||
MaskList[6] = LockMask | ScrollLockMask;
|
MaskList[6] = ScrollLockMask | NumLockMask;
|
||||||
MaskList[7] = LockMask | NumLockMask | ScrollLockMask;
|
MaskList[7] = ScrollLockMask | LockMask | NumLockMask;
|
||||||
MaskListLength = sizeof(MaskList) / sizeof(MaskList[0]);
|
MaskListLength = sizeof(MaskList) / sizeof(MaskList[0]);
|
||||||
|
|
||||||
if (modmap) XFreeModifiermap(const_cast<XModifierKeymap*>(modmap));
|
if (modmap) XFreeModifiermap(const_cast<XModifierKeymap*>(modmap));
|
||||||
#else // NOCLOBBER
|
|
||||||
NumLockMask = 0;
|
|
||||||
ScrollLockMask = 0;
|
|
||||||
#endif // NOCLOBBER
|
|
||||||
|
|
||||||
gccache = 0;
|
gccache = (BGCCache *) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -359,36 +354,32 @@ void BaseDisplay::removeTimer(BTimer *timer) {
|
||||||
/*
|
/*
|
||||||
* Grabs a button, but also grabs the button in every possible combination
|
* Grabs a button, but also grabs the button in every possible combination
|
||||||
* with the keyboard lock keys, so that they do not cancel out the event.
|
* with the keyboard lock keys, so that they do not cancel out the event.
|
||||||
|
|
||||||
|
* if allow_scroll_lock is true then only the top half of the lock mask
|
||||||
|
* table is used and scroll lock is ignored. This value defaults to false.
|
||||||
*/
|
*/
|
||||||
void BaseDisplay::grabButton(unsigned int button, unsigned int modifiers,
|
void BaseDisplay::grabButton(unsigned int button, unsigned int modifiers,
|
||||||
Window grab_window, bool owner_events,
|
Window grab_window, bool owner_events,
|
||||||
unsigned int event_mask, int pointer_mode,
|
unsigned int event_mask, int pointer_mode,
|
||||||
int keyboard_mode, Window confine_to,
|
int keyboard_mode, Window confine_to,
|
||||||
Cursor cursor) const {
|
Cursor cursor, bool allow_scroll_lock) const {
|
||||||
#ifndef NOCLOBBER
|
unsigned int length = (allow_scroll_lock) ? MaskListLength / 2:
|
||||||
for (size_t cnt = 0; cnt < MaskListLength; ++cnt)
|
MaskListLength;
|
||||||
|
for (size_t cnt = 0; cnt < length; ++cnt)
|
||||||
XGrabButton(display, button, modifiers | MaskList[cnt], grab_window,
|
XGrabButton(display, button, modifiers | MaskList[cnt], grab_window,
|
||||||
owner_events, event_mask, pointer_mode, keyboard_mode,
|
owner_events, event_mask, pointer_mode, keyboard_mode,
|
||||||
confine_to, cursor);
|
confine_to, cursor);
|
||||||
#else // NOCLOBBER
|
|
||||||
XGrabButton(display, button, modifiers, grab_window,
|
|
||||||
owner_events, event_mask, pointer_mode, keyboard_mode,
|
|
||||||
confine_to, cursor);
|
|
||||||
#endif // NOCLOBBER
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Releases the grab on a button, and ungrabs all possible combinations of the
|
* Releases the grab on a button, and ungrabs all possible combinations of the
|
||||||
* keyboard lock keys.
|
* keyboard lock keys.
|
||||||
*/
|
*/
|
||||||
void BaseDisplay::ungrabButton(unsigned int button, unsigned int modifiers,
|
void BaseDisplay::ungrabButton(unsigned int button, unsigned int modifiers,
|
||||||
Window grab_window) const {
|
Window grab_window) const {
|
||||||
#ifndef NOCLOBBER
|
|
||||||
for (size_t cnt = 0; cnt < MaskListLength; ++cnt)
|
for (size_t cnt = 0; cnt < MaskListLength; ++cnt)
|
||||||
XUngrabButton(display, button, modifiers | MaskList[cnt], grab_window);
|
XUngrabButton(display, button, modifiers | MaskList[cnt], grab_window);
|
||||||
#else // NOCLOBBER
|
|
||||||
XUngrabButton(display, button, modifiers, grab_window);
|
|
||||||
#endif // NOCLOBBER
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -399,10 +390,11 @@ const ScreenInfo* BaseDisplay::getScreenInfo(unsigned int s) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BGCCache *BaseDisplay::gcCache(void) const
|
BGCCache* BaseDisplay::gcCache(void) const {
|
||||||
{
|
if (! gccache)
|
||||||
if (! gccache) gccache = new BGCCache(this);
|
gccache = new BGCCache(this);
|
||||||
return gccache;
|
|
||||||
|
return gccache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -77,10 +77,8 @@ private:
|
||||||
};
|
};
|
||||||
BShape shape;
|
BShape shape;
|
||||||
|
|
||||||
#ifndef NOCLOBBER
|
|
||||||
unsigned int MaskList[8];
|
unsigned int MaskList[8];
|
||||||
size_t MaskListLength;
|
size_t MaskListLength;
|
||||||
#endif // NOCLOBBER
|
|
||||||
|
|
||||||
enum RunState { STARTUP, RUNNING, SHUTDOWN };
|
enum RunState { STARTUP, RUNNING, SHUTDOWN };
|
||||||
RunState run_state;
|
RunState run_state;
|
||||||
|
@ -139,7 +137,8 @@ public:
|
||||||
void grabButton(unsigned int button, unsigned int modifiers,
|
void grabButton(unsigned int button, unsigned int modifiers,
|
||||||
Window grab_window, bool owner_events,
|
Window grab_window, bool owner_events,
|
||||||
unsigned int event_mask, int pointer_mode,
|
unsigned int event_mask, int pointer_mode,
|
||||||
int keyboard_mode, Window confine_to, Cursor cursor) const;
|
int keyboard_mode, Window confine_to, Cursor cursor,
|
||||||
|
bool allow_scroll_lock) const;
|
||||||
void ungrabButton(unsigned int button, unsigned int modifiers,
|
void ungrabButton(unsigned int button, unsigned int modifiers,
|
||||||
Window grab_window) const;
|
Window grab_window) const;
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,10 @@ Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
|
||||||
"Window-To-Window Snapping"), 6);
|
"Window-To-Window Snapping"), 6);
|
||||||
insert(i18n(ConfigmenuSet, ConfigmenuWindowCornerSnap,
|
insert(i18n(ConfigmenuSet, ConfigmenuWindowCornerSnap,
|
||||||
"Window Corner Snapping"), 7);
|
"Window Corner Snapping"), 7);
|
||||||
|
insert(i18n(ConfigmenuSet, ConfigmenuDisableBindings,
|
||||||
|
"Disable Mouse with Scroll Lock"), 8);
|
||||||
insert(i18n(ConfigmenuSet, ConfigmenuHideToolbar,
|
insert(i18n(ConfigmenuSet, ConfigmenuHideToolbar,
|
||||||
"Hide Toolbar"), 8);
|
"Hide Toolbar"), 9);
|
||||||
update();
|
update();
|
||||||
setValues();
|
setValues();
|
||||||
}
|
}
|
||||||
|
@ -75,7 +77,8 @@ void Configmenu::setValues(void) {
|
||||||
setItemSelected(8, getScreen()->getWindowCornerSnap());
|
setItemSelected(8, getScreen()->getWindowCornerSnap());
|
||||||
setItemEnabled(8, getScreen()->getWindowToWindowSnap());
|
setItemEnabled(8, getScreen()->getWindowToWindowSnap());
|
||||||
|
|
||||||
setItemSelected(9, getScreen()->doHideToolbar());
|
setItemSelected(9, getScreen()->allowScrollLock());
|
||||||
|
setItemSelected(10, getScreen()->doHideToolbar());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -84,6 +87,7 @@ Configmenu::~Configmenu(void) {
|
||||||
delete placementmenu;
|
delete placementmenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Configmenu::itemSelected(int button, unsigned int index) {
|
void Configmenu::itemSelected(int button, unsigned int index) {
|
||||||
if (button != 1)
|
if (button != 1)
|
||||||
return;
|
return;
|
||||||
|
@ -130,7 +134,13 @@ void Configmenu::itemSelected(int button, unsigned int index) {
|
||||||
setItemSelected(index, getScreen()->getWindowCornerSnap());
|
setItemSelected(index, getScreen()->getWindowCornerSnap());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8: // hide toolbar
|
case 8: // disable mouse bindings with Scroll Lock
|
||||||
|
getScreen()->saveAllowScrollLock(! getScreen()->allowScrollLock());
|
||||||
|
setItemSelected(index, getScreen()->allowScrollLock());
|
||||||
|
getScreen()->reconfigure();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 9: // hide toolbar
|
||||||
getScreen()->saveHideToolbar(! getScreen()->doHideToolbar());
|
getScreen()->saveHideToolbar(! getScreen()->doHideToolbar());
|
||||||
setItemSelected(index, getScreen()->doHideToolbar());
|
setItemSelected(index, getScreen()->doHideToolbar());
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -526,6 +526,13 @@ void BScreen::savePlaceIgnoreMaximized(bool i) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void BScreen::saveAllowScrollLock(bool a) {
|
||||||
|
resource.allow_scroll_lock = a;
|
||||||
|
config->setValue(screenstr + "disableBindingsWithScrollLock",
|
||||||
|
resource.allow_scroll_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void BScreen::save_rc(void) {
|
void BScreen::save_rc(void) {
|
||||||
saveSloppyFocus(resource.sloppy_focus);
|
saveSloppyFocus(resource.sloppy_focus);
|
||||||
saveAutoRaise(resource.auto_raise);
|
saveAutoRaise(resource.auto_raise);
|
||||||
|
@ -552,6 +559,7 @@ void BScreen::save_rc(void) {
|
||||||
#endif // HAVE_STRFTIME
|
#endif // HAVE_STRFTIME
|
||||||
savePlaceIgnoreShaded(resource.ignore_shaded);
|
savePlaceIgnoreShaded(resource.ignore_shaded);
|
||||||
savePlaceIgnoreMaximized(resource.ignore_maximized);
|
savePlaceIgnoreMaximized(resource.ignore_maximized);
|
||||||
|
saveAllowScrollLock(resource.allow_scroll_lock);
|
||||||
|
|
||||||
toolbar->save_rc();
|
toolbar->save_rc();
|
||||||
slit->save_rc();
|
slit->save_rc();
|
||||||
|
@ -686,6 +694,10 @@ void BScreen::load_rc(void) {
|
||||||
if (! config->getValue(screenstr + "placementIgnoreMaximized",
|
if (! config->getValue(screenstr + "placementIgnoreMaximized",
|
||||||
resource.ignore_maximized))
|
resource.ignore_maximized))
|
||||||
resource.ignore_maximized = true;
|
resource.ignore_maximized = true;
|
||||||
|
|
||||||
|
if (! config->getValue(screenstr + "disableBindingsWithScrollLock",
|
||||||
|
resource.allow_scroll_lock))
|
||||||
|
resource.allow_scroll_lock = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -144,8 +144,8 @@ private:
|
||||||
|
|
||||||
bool sloppy_focus, auto_raise, auto_edge_balance, ordered_dither,
|
bool sloppy_focus, auto_raise, auto_edge_balance, ordered_dither,
|
||||||
opaque_move, full_max, focus_new, focus_last, click_raise,
|
opaque_move, full_max, focus_new, focus_last, click_raise,
|
||||||
hide_toolbar, window_to_window_snap, window_corner_snap, aa_fonts,
|
allow_scroll_lock, hide_toolbar, window_to_window_snap,
|
||||||
ignore_shaded, ignore_maximized;
|
window_corner_snap, aa_fonts, ignore_shaded, ignore_maximized;
|
||||||
BColor border_color;
|
BColor border_color;
|
||||||
|
|
||||||
unsigned int workspaces;
|
unsigned int workspaces;
|
||||||
|
@ -214,6 +214,7 @@ public:
|
||||||
{ return resource.window_to_window_snap; }
|
{ return resource.window_to_window_snap; }
|
||||||
inline bool getWindowCornerSnap(void) const
|
inline bool getWindowCornerSnap(void) const
|
||||||
{ return resource.window_corner_snap; }
|
{ return resource.window_corner_snap; }
|
||||||
|
inline bool allowScrollLock(void) const { return resource.allow_scroll_lock; }
|
||||||
|
|
||||||
inline const GC &getOpGC(void) const { return opGC; }
|
inline const GC &getOpGC(void) const { return opGC; }
|
||||||
|
|
||||||
|
@ -285,6 +286,7 @@ public:
|
||||||
void saveResizeZones(unsigned int z);
|
void saveResizeZones(unsigned int z);
|
||||||
void savePlaceIgnoreShaded(bool i);
|
void savePlaceIgnoreShaded(bool i);
|
||||||
void savePlaceIgnoreMaximized(bool i);
|
void savePlaceIgnoreMaximized(bool i);
|
||||||
|
void saveAllowScrollLock(bool a);
|
||||||
inline void iconUpdate(void) { iconmenu->update(); }
|
inline void iconUpdate(void) { iconmenu->update(); }
|
||||||
|
|
||||||
#ifdef HAVE_STRFTIME
|
#ifdef HAVE_STRFTIME
|
||||||
|
|
|
@ -819,24 +819,27 @@ void BlackboxWindow::reconfigure(void) {
|
||||||
|
|
||||||
|
|
||||||
void BlackboxWindow::grabButtons(void) {
|
void BlackboxWindow::grabButtons(void) {
|
||||||
if ((! screen->isSloppyFocus()) || screen->doClickRaise())
|
if (! screen->isSloppyFocus() || screen->doClickRaise())
|
||||||
// grab button 1 for changing focus/raising
|
// grab button 1 for changing focus/raising
|
||||||
blackbox->grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
|
blackbox->grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
|
||||||
GrabModeSync, GrabModeSync, frame.plate, None);
|
GrabModeSync, GrabModeSync, frame.plate, None,
|
||||||
|
screen->allowScrollLock());
|
||||||
|
|
||||||
if (functions & Func_Move)
|
if (functions & Func_Move)
|
||||||
blackbox->grabButton(Button1, Mod1Mask, frame.window, True,
|
blackbox->grabButton(Button1, Mod1Mask, frame.window, True,
|
||||||
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
|
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
|
||||||
GrabModeAsync, frame.window,
|
GrabModeAsync, frame.window, None,
|
||||||
blackbox->getMoveCursor());
|
screen->allowScrollLock());
|
||||||
if (functions & Func_Resize)
|
if (functions & Func_Resize)
|
||||||
blackbox->grabButton(Button3, Mod1Mask, frame.window, True,
|
blackbox->grabButton(Button3, Mod1Mask, frame.window, True,
|
||||||
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
|
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
|
||||||
GrabModeAsync, frame.window, None);
|
GrabModeAsync, frame.window, None,
|
||||||
|
screen->allowScrollLock());
|
||||||
// alt+middle lowers the window
|
// alt+middle lowers the window
|
||||||
blackbox->grabButton(Button2, Mod1Mask, frame.window, True,
|
blackbox->grabButton(Button2, Mod1Mask, frame.window, True,
|
||||||
ButtonReleaseMask, GrabModeAsync, GrabModeAsync,
|
ButtonReleaseMask, GrabModeAsync, GrabModeAsync,
|
||||||
frame.window, None);
|
frame.window, None,
|
||||||
|
screen->allowScrollLock());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
14
src/main.cc
14
src/main.cc
|
@ -77,8 +77,6 @@ static void showHelp(int exitval) {
|
||||||
"Compile time options:\n"
|
"Compile time options:\n"
|
||||||
" Debugging:\t\t\t%s\n"
|
" Debugging:\t\t\t%s\n"
|
||||||
" Shape:\t\t\t%s\n"
|
" Shape:\t\t\t%s\n"
|
||||||
" Slit:\t\t\t\t%s\n"
|
|
||||||
" Event Clobbering:\t\t%s\n"
|
|
||||||
" 8bpp Ordered Dithering:\t%s\n\n"),
|
" 8bpp Ordered Dithering:\t%s\n\n"),
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
i18n(CommonSet, CommonYes, "yes"),
|
i18n(CommonSet, CommonYes, "yes"),
|
||||||
|
@ -92,18 +90,6 @@ static void showHelp(int exitval) {
|
||||||
i18n(CommonSet, CommonNo, "no"),
|
i18n(CommonSet, CommonNo, "no"),
|
||||||
#endif // SHAPE
|
#endif // SHAPE
|
||||||
|
|
||||||
#ifdef SLIT
|
|
||||||
i18n(CommonSet, CommonYes, "yes"),
|
|
||||||
#else // !SLIT
|
|
||||||
i18n(CommonSet, CommonNo, "no"),
|
|
||||||
#endif // SLIT
|
|
||||||
|
|
||||||
#ifndef NOCLOBBER
|
|
||||||
i18n(CommonSet, CommonYes, "yes"),
|
|
||||||
#else // !NOCLOBBER
|
|
||||||
i18n(CommonSet, CommonNo, "no"),
|
|
||||||
#endif // NOCLOBBER
|
|
||||||
|
|
||||||
#ifdef ORDEREDPSEUDO
|
#ifdef ORDEREDPSEUDO
|
||||||
i18n(CommonSet, CommonYes, "yes")
|
i18n(CommonSet, CommonYes, "yes")
|
||||||
#else // !ORDEREDPSEUDO
|
#else // !ORDEREDPSEUDO
|
||||||
|
|
Loading…
Reference in a new issue