]> Dogcows Code - chaz/openbox/commitdiff
sync with bb-cvs.
authorDana Jansens <danakj@orodu.net>
Sun, 21 Jul 2002 09:56:18 +0000 (09:56 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 21 Jul 2002 09:56:18 +0000 (09:56 +0000)
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.

31 files changed:
configure.in
nls/C/Configmenu.m
nls/C/main.m
nls/da_DK/Configmenu.m
nls/da_DK/main.m
nls/de_DE/main.m
nls/es_ES/main.m
nls/et_EE/main.m
nls/fr_FR/main.m
nls/hu_HU/main.m
nls/it_IT/main.m
nls/ja_JP/main.m
nls/ko_KR/main.m
nls/nl_NL/main.m
nls/no_NO/main.m
nls/pt_BR/main.m
nls/ro_RO/main.m
nls/ru_RU/main.m
nls/sl_SI/main.m
nls/sv_SE/main.m
nls/tr_TR/main.m
nls/uk_UA/main.m
nls/zh_CN/main.m
nls/zh_TW/main.m
src/BaseDisplay.cc
src/BaseDisplay.hh
src/Configmenu.cc
src/Screen.cc
src/Screen.hh
src/Window.cc
src/main.cc

index b3ecf4b40b09bee0130eac38dc9c8fb414b59973..962e67e376e61eecf14f11efbde3c3214ec7c0d5 100644 (file)
@@ -112,24 +112,6 @@ if test x$XFT = "xyes"; then
   AC_DEFINE(XFT,1,Enable support of the Xft extension)
 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
 ORDEREDPSEUDO=""
 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)
 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
 DEBUG=""
 AC_MSG_CHECKING([whether to include verbose debugging code])
index 16279d94a3bf3ad578e804d928156e40d548d452..5f6bc1af5b784bb105f313f3117a93b6c06f168c 100644 (file)
@@ -20,6 +20,8 @@ $ #WindowToWindowSnap
 # Window-To-Window Snapping
 $ #WindowCornerSnap
 # Window Corner Snapping
+$ #DisableBindings
+# Disable Mouse with Scroll Lock
 $ #HideToolbar
 # Hide Toolbar
 $ #ClickToFocus
index acc29ec45419564c6a30881f5f8fe5e4d9104196..79474952404dd87e8989885707a4b5c80ef671be 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Compile time options:\n\
   Debugging\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
index a8ce6715b51d79d30e477746b5e35fceea045142..1e18a2e33bcd70b9fa1dc4e6a819c7c348d1f4a5 100644 (file)
@@ -16,6 +16,8 @@ $ #FocusNew
 # Fokus nyt vindue
 $ #FocusLast
 # Fokus vindue ved skrivebords ændring
+$ #DisableBindings
+# Deaktiver tastebindinger med Scroll Lock
 $ #ClickToFocus
 # Klik for fokus
 $ #SloppyFocus
index 0089ffabf92595501c102612cf6c00987ccd3753..e95a8243a39f52f4e18c5ace4723ac3566ea435c 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Kompileret med:\n\
   Debugging\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
index 92d831232133576c1731e932d01ed9e55002c3c0..41cfd57238dc6c385f67b6fad5e23b135a9d4e3d 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Optionen zum Kompilationszeitpunkt:\n\
   Debugging\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
index c314be9f649db781aac35e619dee814554fa9f5d..bf9d4b613749cf945e4e6b68720cb26f24e422d0 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Opciones durante la compilación:\n\
   Información extra para depuración:               %s\n\
   Forma:                                           %s\n\
-  Slit:                                            %s\n\
-  Event Clobbering:                                %s\n\
   8bpp simulación ordenada de colores en imágenes: %s\n\n
index 7115f7afd231a3455e0574d76828512d668463c9..4ca75cd67074e4c3ea336b2eb4543b0a65ba1f64 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Kompileerimisoptsioonid:\n\
   Debuggimine\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
index 8c36b82f799bab00274b8eae6cb6b6f6b8c7455f..f33f2f133eb36871a4d2577e726a167cc1f90079 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Options de compilation:\n\
   Debugage\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
index da240973c4fcb94cf4f97a32214a1241fe5e44b9..bc622345dd5f1d63dbf5c782b3c1cc810d78b926 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Fordításnál állítható lehetõségek:\n\
   Debugging\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
index 23fe6a8c31de7dabfdca90943430b7febd49c107..b63b737115e831a941c1569e97cac2018f46700e 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Opzioni in fase di compilazione:\n\
   Debugging\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
index 91ad47a7c8056c280d370fa27c32aa2bc0715c58..63532de4829605bdda99241a53520c5315e5d413 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # ¥³¥ó¥Ñ¥¤¥ë»þ¥ª¥×¥·¥ç¥ó:\n\
   Debugging\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
index b8d2baf6ec3c3f9bacbbe010a5eab316f2d937d7..65206ed2c21082191f0bb2d7aed3dbe8d3527078 100644 (file)
@@ -2,13 +2,16 @@ $set 14 #main
 
 $ #RCRequiresArg
 # error: '-rc' requires an argument\n
+$ #MENURequiresArg
+# error: '-menu' requires an argument\n
 $ #DISPLAYRequiresArg
 # error: '-display' requires an argument\n
 $ #WarnDisplaySet
 # warning: could not set environment variable 'DISPLAY'\n
 $ #Usage
-# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\
-  \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
+# Openbox %s : (c) 2002 - 2002 Ben Jansens\n\
+                    2001 - 2002 Sean 'Shaleh' Perry\n\
+                    1997 - 2000, 2002 Brad Hughes\n\n\
   -display <string>\t\tuse display connection.\n\
   -rc <string>\t\t\tuse alternate resource file.\n\
   -version\t\t\tdisplay version and exit.\n\
index d6d4fc956b2aa9b897bc13911d6c6a34a25743cb..010049d31ffc152beccabcd2e8c19af553ef5b77 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Gecompileerd met instellingen:\n\
   Debugging:               %s\n\
   Shape:                   %s\n\
-  Slit:\t\t\t\t%s\n\
-  Event Clobbering:\t\t%s\n\
   8bpp Ordered Dithering:  %s\n\n
index 604369864a7ac26f8cd914e364eb328e28900ff8..f4e073fad5af5946b55b3b73b4d04f6354a24262 100644 (file)
@@ -2,13 +2,16 @@ $set 14 #main
 
 $ #RCRequiresArg
 # feil: '-rc' krever et argument\n
+$ #MENURequiresArg
+# feil: '-menu' krever et argument\n
 $ #DISPLAYRequiresArg
 # feil: '-display' krever et argument\n
 $ #WarnDisplaySet
 # advarsel: kunne ikke sette 'DISPLAY' miljøvariabelen\n
 $ #Usage
-# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\
-  \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
+# Openbox %s : (c) 2002 - 2002 Ben Jansens\n\
+                    2001 - 2002 Sean 'Shaleh' Perry\n\
+                    1997 - 2000, 2002 Brad Hughes\n\n\
   -display <streng>\t\tbruk skjermtilkobling.\n\
   -rc <streng>\t\t\tbrug alternativ ressursfil.\n\
   -version\t\t\tvis versjonsnummeret og avslutt.\n\
index 45b12bb10700542dfffbdf675433f2c73ef8e5e3..0946aeed20df3f142b3d2cfb13fef581c4ece53d 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Opções em tempo de compilação:\n\
   Informações extras para problemas:\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
index b5a40e5bbc2c23cbf80582d4ed59a9aa96d672db..9babaaeccddf891bcb43f1bc979f75c21c59d9d7 100644 (file)
@@ -2,13 +2,16 @@ $set 14 #main
 
 $ #RCRequiresArg
 # eroare: '-rc' necesita inca un parametru\n
+$ #MENURequiresArg
+# eroare: '-menu' necesita inca un parametru\n
 $ #DISPLAYRequiresArg
 # eroare: '-display' necesita inca un parametru\n
 $ #WarnDisplaySet
 # atentionare: nu am putut crea variabila de mediu 'DISPLAY'\n
 $ #Usage
-# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\
-  \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\
+# Openbox %s : (c) 2002 - 2002 Ben Jansens\n\
+                    2001 - 2002 Sean 'Shaleh' Perry\n\
+                    1997 - 2000, 2002 Brad Hughes\n\n\
   -display <sir>\t\tconexiunea la ecran.\n\
   -rc <sir>\t\t\tfisier de configurare.\n\
   -version\t\t\tafiseaza versiunea.\n\
index b9e32f0d9f1ff61dcff47aa50332689ce17b3104..c3dcf324d8eb1fd14a17ed1ae641837368554704 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Compile time options:\n\
   Debugging\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
index c77a4ab484151f370c068df683d155154da95fdd..c24ddb91db5670ef27a5294ba380644f9290aaf1 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Izbire pri prevajanju:\n\
   Razhro¹èevanje\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
index 81bdd1bb04cd3569ac5d20c3f98264ab0a801694..98ba3512957a54dd3711e005cbfeda030667cecc 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Kompilerad med:\n\
   Avlusning\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
index f382efb462f207fb1b08cd4a52dc95ac720c7e20..18bef84d23a3923636a44daa3e86c3e43f3f86de 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Denetleme seçenekleri :\n\
   Bilgilendirme\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
index 9e5b1a39f5faea82fe4a7d141ba1797b7ec5373c..7132dd7cc97bab0ef2cf8b503a3fb54c28f2467c 100644 (file)
@@ -22,6 +22,4 @@ $ #CompileOptions
   Debugging\t\t\t%s\n\
   Interlacing:\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
index f1b2d3b92b75984aa54d01863f554d9474fd8b2a..142e00429fa83c8c54686cafba0bd1337c391422 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # ±àÒëÑ¡Ïî:\n\
   Debugging\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
index acc29ec45419564c6a30881f5f8fe5e4d9104196..79474952404dd87e8989885707a4b5c80ef671be 100644 (file)
@@ -21,6 +21,4 @@ $ #CompileOptions
 # Compile time options:\n\
   Debugging\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
index aa2d974ee83b2ef17e0f2b356d9e26e3caefc3e4..6bf290e26cb1102865a32b064b4747ae3c84f6c7 100644 (file)
@@ -238,7 +238,6 @@ BaseDisplay::BaseDisplay(const char *app_name, const char *dpy_name) {
   for (int i = 0; i < ScreenCount(display); ++i)
     screenInfoList.push_back(ScreenInfo(this, i));
 
-#ifndef   NOCLOBBER
   NumLockMask = ScrollLockMask = 0;
 
   const XModifierKeymap* const modmap = XGetModifierMapping(display);
@@ -268,20 +267,16 @@ BaseDisplay::BaseDisplay(const char *app_name, const char *dpy_name) {
   MaskList[0] = 0;
   MaskList[1] = LockMask;
   MaskList[2] = NumLockMask;
-  MaskList[3] = ScrollLockMask;
-  MaskList[4] = LockMask | NumLockMask;
-  MaskList[5] = NumLockMask  | ScrollLockMask;
-  MaskList[6] = LockMask | ScrollLockMask;
-  MaskList[7] = LockMask | NumLockMask | ScrollLockMask;
+  MaskList[3] = LockMask | NumLockMask;
+  MaskList[4] = ScrollLockMask;
+  MaskList[5] = ScrollLockMask | LockMask;
+  MaskList[6] = ScrollLockMask | NumLockMask;
+  MaskList[7] = ScrollLockMask | LockMask | NumLockMask;
   MaskListLength = sizeof(MaskList) / sizeof(MaskList[0]);
 
   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
  * 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,
                              Window grab_window, bool owner_events,
                              unsigned int event_mask, int pointer_mode,
                              int keyboard_mode, Window confine_to,
-                             Cursor cursor) const {
-#ifndef   NOCLOBBER
-  for (size_t cnt = 0; cnt < MaskListLength; ++cnt)
+                             Cursor cursor, bool allow_scroll_lock) const {
+  unsigned int length = (allow_scroll_lock) ? MaskListLength / 2:
+                                              MaskListLength;
+  for (size_t cnt = 0; cnt < length; ++cnt)
     XGrabButton(display, button, modifiers | MaskList[cnt], grab_window,
                 owner_events, event_mask, pointer_mode, keyboard_mode,
                 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
  * keyboard lock keys.
  */
 void BaseDisplay::ungrabButton(unsigned int button, unsigned int modifiers,
                                Window grab_window) const {
-#ifndef   NOCLOBBER
   for (size_t cnt = 0; cnt < MaskListLength; ++cnt)
     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
-{
-    if (! gccache) gccache = new BGCCache(this);
-    return gccache;
+BGCCache* BaseDisplay::gcCache(void) const {
+  if (! gccache)
+    gccache = new BGCCache(this);
+  
+  return gccache;
 }
 
 
index 921f6ecd1a76733d0a88f3059b1995367ec8a279..3ebe6e616a4b23c575d444e6b9420735155f115e 100644 (file)
@@ -77,10 +77,8 @@ private:
   };
   BShape shape;
 
-#ifndef   NOCLOBBER
   unsigned int MaskList[8];
   size_t MaskListLength;
-#endif // NOCLOBBER
 
   enum RunState { STARTUP, RUNNING, SHUTDOWN };
   RunState run_state;
@@ -139,7 +137,8 @@ public:
   void grabButton(unsigned int button, unsigned int modifiers,
                   Window grab_window, bool owner_events,
                   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,
                     Window grab_window) const;
 
index e73ae327ba5999123944646c919494f4b3f42f8b..c5c58d916cab03aa98476c4ff1f6f9af94274de3 100644 (file)
@@ -57,8 +57,10 @@ Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
               "Window-To-Window Snapping"), 6);
   insert(i18n(ConfigmenuSet, ConfigmenuWindowCornerSnap,
               "Window Corner Snapping"), 7);
+  insert(i18n(ConfigmenuSet, ConfigmenuDisableBindings,
+              "Disable Mouse with Scroll Lock"), 8);
   insert(i18n(ConfigmenuSet, ConfigmenuHideToolbar,
-              "Hide Toolbar"), 8);
+              "Hide Toolbar"), 9);
   update();
   setValues();
 }
@@ -75,7 +77,8 @@ void Configmenu::setValues(void) {
   setItemSelected(8, getScreen()->getWindowCornerSnap());
   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;
 }
 
+
 void Configmenu::itemSelected(int button, unsigned int index) {
   if (button != 1)
     return;
@@ -130,7 +134,13 @@ void Configmenu::itemSelected(int button, unsigned int index) {
     setItemSelected(index, getScreen()->getWindowCornerSnap());
     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());
     setItemSelected(index, getScreen()->doHideToolbar());
     break;
index f1ba429c25048d4b098e1a61e2a2d8b644f5b0aa..6b895644e7b28fac65599d36d9e40c2b55c9ac7e 100644 (file)
@@ -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) {
   saveSloppyFocus(resource.sloppy_focus);
   saveAutoRaise(resource.auto_raise);
@@ -552,6 +559,7 @@ void BScreen::save_rc(void) {
 #endif // HAVE_STRFTIME
   savePlaceIgnoreShaded(resource.ignore_shaded);
   savePlaceIgnoreMaximized(resource.ignore_maximized);
+  saveAllowScrollLock(resource.allow_scroll_lock);
 
   toolbar->save_rc();
   slit->save_rc();
@@ -686,6 +694,10 @@ void BScreen::load_rc(void) {
   if (! config->getValue(screenstr + "placementIgnoreMaximized",
                          resource.ignore_maximized))
     resource.ignore_maximized = true;
+
+  if (! config->getValue(screenstr + "disableBindingsWithScrollLock",
+                         resource.allow_scroll_lock))
+    resource.allow_scroll_lock = false;
 }
 
 
index f17c6f5466f88d811cc7b6fc874edaa8261a1554..c16bd0773cc826830705282f7efd9d8b6af19fe8 100644 (file)
@@ -144,8 +144,8 @@ private:
 
     bool sloppy_focus, auto_raise, auto_edge_balance, ordered_dither,
       opaque_move, full_max, focus_new, focus_last, click_raise,
-      hide_toolbar, window_to_window_snap, window_corner_snap, aa_fonts,
-      ignore_shaded, ignore_maximized;
+      allow_scroll_lock, hide_toolbar, window_to_window_snap,
+      window_corner_snap, aa_fonts, ignore_shaded, ignore_maximized;
     BColor border_color;
 
     unsigned int workspaces;
@@ -214,6 +214,7 @@ public:
     { return resource.window_to_window_snap; }
   inline bool getWindowCornerSnap(void) const
     { return resource.window_corner_snap; }
+  inline bool allowScrollLock(void) const { return resource.allow_scroll_lock; }
 
   inline const GC &getOpGC(void) const { return opGC; }
 
@@ -285,6 +286,7 @@ public:
   void saveResizeZones(unsigned int z);
   void savePlaceIgnoreShaded(bool i);
   void savePlaceIgnoreMaximized(bool i);
+  void saveAllowScrollLock(bool a);
   inline void iconUpdate(void) { iconmenu->update(); }
 
 #ifdef    HAVE_STRFTIME
index 8899ff1646c73ee7f70091a097b3fecae4a6a600..316bbf1ae4127918743994b8e1d47f6e8c2632c2 100644 (file)
@@ -819,24 +819,27 @@ void BlackboxWindow::reconfigure(void) {
 
 
 void BlackboxWindow::grabButtons(void) {
-  if ((! screen->isSloppyFocus()) || screen->doClickRaise())
+  if (! screen->isSloppyFocus() || screen->doClickRaise())
     // grab button 1 for changing focus/raising
     blackbox->grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
-                         GrabModeSync, GrabModeSync, frame.plate, None);
-
+                         GrabModeSync, GrabModeSync, frame.plate, None,
+                         screen->allowScrollLock());
+  
   if (functions & Func_Move)
     blackbox->grabButton(Button1, Mod1Mask, frame.window, True,
                          ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
-                         GrabModeAsync, frame.window,
-                         blackbox->getMoveCursor());
+                         GrabModeAsync, frame.window, None,
+                         screen->allowScrollLock());
   if (functions & Func_Resize)
     blackbox->grabButton(Button3, Mod1Mask, frame.window, True,
                          ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
-                         GrabModeAsync, frame.window, None);
+                         GrabModeAsync, frame.window, None,
+                         screen->allowScrollLock());
   // alt+middle lowers the window
   blackbox->grabButton(Button2, Mod1Mask, frame.window, True,
                        ButtonReleaseMask, GrabModeAsync, GrabModeAsync,
-                       frame.window, None);
+                       frame.window, None,
+                       screen->allowScrollLock());
 }
 
 
index c06543a1cd08004778d5a1fa2eed45eda8fef946..47debac1f1e53a21d51917753def70488a75742a 100644 (file)
@@ -77,8 +77,6 @@ static void showHelp(int exitval) {
               "Compile time options:\n"
               "  Debugging:\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"),
 #ifdef    DEBUG
          i18n(CommonSet, CommonYes, "yes"),
@@ -92,18 +90,6 @@ static void showHelp(int exitval) {
          i18n(CommonSet, CommonNo, "no"),
 #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
          i18n(CommonSet, CommonYes, "yes")
 #else // !ORDEREDPSEUDO
This page took 0.051672 seconds and 4 git commands to generate.