-// Clientmenu.cc for Openbox
-// Copyright (c) 2001 Sean 'Shaleh' Perry <shaleh@debian.org>
+// -*- mode: C++; indent-tabs-mode: nil; -*-
+// Clientmenu.cc for Blackbox - an X11 Window manager
+// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org>
// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
//
// Permission is hereby granted, free of charge, to any person obtaining a
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
-// stupid macros needed to access some functions in version 2 of the GNU C
-// library
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif // _GNU_SOURCE
-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif // HAVE_CONFIG_H
-#include "openbox.h"
-#include "Clientmenu.h"
-#include "Screen.h"
-#include "Window.h"
-#include "Workspace.h"
-#include "Workspacemenu.h"
+#include "blackbox.hh"
+#include "Clientmenu.hh"
+#include "Screen.hh"
+#include "Window.hh"
+#include "Workspace.hh"
+#include "Workspacemenu.hh"
Clientmenu::Clientmenu(Workspace *ws) : Basemenu(ws->getScreen()) {
wkspc = ws;
- screen = wkspc->getScreen();
setInternalMenu();
}
-void Clientmenu::itemSelected(int button, int index) {
+void Clientmenu::itemSelected(int button, unsigned int index) {
if (button > 2) return;
- OpenboxWindow *win = wkspc->getWindow(index);
+ BlackboxWindow *win = wkspc->getWindow(index);
if (win) {
if (button == 1) {
if (! wkspc->isCurrent()) wkspc->setCurrent();
win->setInputFocus();
}
- if (! (screen->getWorkspacemenu()->isTorn() || isTorn())) hide();
+ Workspacemenu* wkspcmenu = wkspc->getScreen()->getWorkspacemenu();
+ if (! (wkspcmenu->isTorn() || isTorn())) hide();
}