]> Dogcows Code - chaz/openbox/blobdiff - src/Clientmenu.cc
fixed memory leaks for strftime_format and rootcommand
[chaz/openbox] / src / Clientmenu.cc
index 2191f2a5d9c746ac170dc61c604bbbc35fb28be5..34ed6f11192aa4a0ab8b521bb6310a0d9bfd0227 100644 (file)
 #include "Workspacemenu.h"
 
 
-Clientmenu::Clientmenu(Workspace *ws) : Basemenu(ws->getScreen()) {
-  wkspc = ws;
-  screen = wkspc->getScreen();
-
+Clientmenu::Clientmenu(Workspace &ws) : Basemenu(ws.getScreen()),
+  screen(ws.getScreen()), wkspc(ws)
+{
   setInternalMenu();
 }
 
@@ -49,16 +48,16 @@ Clientmenu::Clientmenu(Workspace *ws) : Basemenu(ws->getScreen()) {
 void Clientmenu::itemSelected(int button, int index) {
   if (button > 2) return;
 
-  OpenboxWindow *win = wkspc->getWindow(index);
+  OpenboxWindow *win = wkspc.getWindow(index);
   if (win) {
     if (button == 1) {
-      if (! wkspc->isCurrent()) wkspc->setCurrent();
+      if (! wkspc.isCurrent()) wkspc.setCurrent();
     } else if (button == 2) {
-      if (! wkspc->isCurrent()) win->deiconify(True, False);
+      if (! wkspc.isCurrent()) win->deiconify(True, False);
     }
-    wkspc->raiseWindow(win);
+    wkspc.raiseWindow(win);
     win->setInputFocus();
   }
 
-  if (! (screen->getWorkspacemenu()->isTorn() || isTorn())) hide();
+  if (! (screen.getWorkspacemenu()->isTorn() || isTorn())) hide();
 }
This page took 0.021265 seconds and 4 git commands to generate.