[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    MMB Shade (for Gallium)
From:       Adriaan de Groot <adridg () cs ! kun ! nl>
Date:       2001-03-30 14:37:16
[Download RAW message or body]

This patch adds the following kwin feature:

	It is possible to shade (or unshade) a window by single clicking
	the middle (or right) mouse button on the window's title bar.

it's only a few lines. HOWEVER the patch is relative to KDE_2_1_BRANCH,
which might be a problem with HEAD.

Could someone check this and commit? Or just give the OK and I'll do it
myself -- and o yeah, I'm afraid that I haven't patched the docs to
reflect this feature.

-- 
+------------------------------+--------------------------------------------+
+ Adriaan de Groot             + Project: FRESCoS                           +
+ adridg@cs.kun.nl             + Private: adridg@sci.kun.nl                 +
+ Kamer A6020 tel. 024 3652272 + http://www.cs.kun.nl/~adridg/frescos/      +

["windowShade.diff" (TEXT/PLAIN)]

Index: kcontrol/kwm/mouse.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kwm/mouse.cpp,v
retrieving revision 1.24
diff -u -r1.24 mouse.cpp
--- kcontrol/kwm/mouse.cpp	2001/01/22 22:18:11	1.24
+++ kcontrol/kwm/mouse.cpp	2001/03/30 14:30:49
@@ -223,6 +223,7 @@
   combo->insertItem(i18n("Operations menu"));
   combo->insertItem(i18n("Toggle raise and lower"));
   combo->insertItem(i18n("Nothing"));
+  combo->insertItem(i18n("Shade"));
   connect(combo, SIGNAL(activated(int)), this, SLOT(slotChanged()));
   layout->addWidget(combo, 4,2);
   coTiAct2 = combo;
@@ -235,6 +236,7 @@
   combo->insertItem(i18n("Operations menu"));
   combo->insertItem(i18n("Toggle raise and lower"));
   combo->insertItem(i18n("Nothing"));
+  combo->insertItem(i18n("Shade"));
   connect(combo, SIGNAL(activated(int)), this, SLOT(slotChanged()));
   layout->addWidget(combo, 5,2);
   coTiAct3 =  combo;
@@ -253,6 +255,7 @@
   combo->insertItem(i18n("Activate and raise"));
   combo->insertItem(i18n("Activate and lower"));
   combo->insertItem(i18n("Activate"));
+  combo->insertItem(i18n("Shade"));
   connect(combo, SIGNAL(activated(int)), this, SLOT(slotChanged()));
   layout->addWidget(combo, 3,3);
   coTiInAct1 = combo;
@@ -262,6 +265,7 @@
   combo->insertItem(i18n("Activate and raise"));
   combo->insertItem(i18n("Activate and lower"));
   combo->insertItem(i18n("Activate"));
+  combo->insertItem(i18n("Shade"));
   connect(combo, SIGNAL(activated(int)), this, SLOT(slotChanged()));
   layout->addWidget(combo, 4,3);
   coTiInAct2 = combo;
@@ -271,6 +275,7 @@
   combo->insertItem(i18n("Activate and raise"));
   combo->insertItem(i18n("Activate and lower"));
   combo->insertItem(i18n("Activate"));
+  combo->insertItem(i18n("Shade"));
   connect(combo, SIGNAL(activated(int)), this, SLOT(slotChanged()));
   layout->addWidget(combo, 5,3);
   coTiInAct3 = combo;
@@ -375,7 +380,7 @@
   case 2: return "Operations menu"; break;
   case 3: return "Toggle raise and lower"; break;
   case 4: return "Nothing"; break;
-  case 5: return ""; break;
+  case 5: return "Shade"; break;
   }
   return "";
 }
@@ -385,7 +390,7 @@
   case 0: return "Activate and raise"; break;
   case 1: return "Activate and lower"; break;
   case 2: return "Activate"; break;
-  case 3: return ""; break;
+  case 3: return "Shade"; break;
   case 4: return ""; break;
   case 5: return ""; break;
   }
Index: kwin/client.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/client.cpp,v
retrieving revision 1.225
diff -u -r1.225 client.cpp
--- kwin/client.cpp	2001/02/22 09:45:19	1.225
+++ kwin/client.cpp	2001/03/30 14:30:50
@@ -2381,6 +2381,9 @@
     case Options::MouseLower:
 	workspace()->lowerClient( this );
 	break;
+    case Options::MouseShade :
+    	setShade(!isShade());
+	break;
     case Options::MouseOperationsMenu:
 	if ( isActive() & ( options->focusPolicy != Options::ClickToFocus &&  options->clickRaise ) )
 	    autoRaise();
Index: kwin/options.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/options.cpp,v
retrieving revision 1.47
diff -u -r1.47 options.cpp
--- kwin/options.cpp	2001/01/20 03:55:42	1.47
+++ kwin/options.cpp	2001/03/30 14:30:50
@@ -252,6 +252,7 @@
     if (name == "Activate and pass click") return MouseActivateAndPassClick;
     if (name == "Move") return MouseMove;
     if (name == "Resize") return MouseResize;
+    if (name == "Shade") return MouseShade;
     if (name == "Nothing") return MouseNothing;
     return MouseNothing;
 }
Index: kwin/options.h
===================================================================
RCS file: /home/kde/kdebase/kwin/options.h,v
retrieving revision 1.27
diff -u -r1.27 options.h
--- kwin/options.h	2001/01/14 20:16:04	1.27
+++ kwin/options.h	2001/03/30 14:30:50
@@ -222,7 +222,9 @@
     MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
     MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
     MouseActivateRaiseAndPassClick, MouseActivateAndPassClick,
-    MouseMove, MouseResize, MouseNothing
+    MouseMove, MouseResize, 
+    MouseShade,
+    MouseNothing
     };
 
     MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }

>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic