X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FClientmenu.cc;h=07f70439106fe0957ad725b8265e267b4842fc2f;hb=cbf4bb3d62df50045fd71920256865becae21990;hp=2191f2a5d9c746ac170dc61c604bbbc35fb28be5;hpb=dfc5f034581f5a26cba5c4811500438f89f0634a;p=chaz%2Fopenbox diff --git a/src/Clientmenu.cc b/src/Clientmenu.cc index 2191f2a5..07f70439 100644 --- a/src/Clientmenu.cc +++ b/src/Clientmenu.cc @@ -1,5 +1,6 @@ -// Clientmenu.cc for Openbox -// Copyright (c) 2001 Sean 'Shaleh' Perry +// -*- mode: C++; indent-tabs-mode: nil; -*- +// Clientmenu.cc for Blackbox - an X11 Window manager +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) // // Permission is hereby granted, free of charge, to any person obtaining a @@ -20,36 +21,29 @@ // 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(); @@ -60,5 +54,6 @@ void Clientmenu::itemSelected(int button, int index) { win->setInputFocus(); } - if (! (screen->getWorkspacemenu()->isTorn() || isTorn())) hide(); + Workspacemenu* wkspcmenu = wkspc->getScreen()->getWorkspacemenu(); + if (! (wkspcmenu->isTorn() || isTorn())) hide(); }