all repos — fluxbox @ 044713cd751ce8e476d0dd162f4cc5e2ce4263b9

custom fork of the fluxbox windowmanager

removed menu and toolbar functions
fluxgen fluxgen
commit

044713cd751ce8e476d0dd162f4cc5e2ce4263b9

parent

ec1947ccc1555b7cdf2335dec7f64c238422f77a

2 files changed, 13 insertions(+), 91 deletions(-)

jump to
M src/fluxbox.ccsrc/fluxbox.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.85 2002/12/02 23:49:56 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.86 2002/12/03 23:58:06 fluxgen Exp $ #include "fluxbox.hh"

@@ -566,12 +566,13 @@ masked_window->motionNotifyEvent(&e->xmotion);

return; } - + // try FbTk::EventHandler first + FbTk::EventManager::instance()->handleEvent(*e); + switch (e->type) { case ButtonRelease: case ButtonPress: handleButtonEvent(e->xbutton); - FbTk::EventManager::instance()->handleEvent(*e); break; case ConfigureRequest: {

@@ -726,17 +727,13 @@ case MotionNotify: {

last_time = e->xmotion.time; FluxboxWindow *win = 0; - Basemenu *menu = 0; Tab *tab = 0; if ((win = searchWindow(e->xmotion.window)) !=0) win->motionNotifyEvent(&e->xmotion); - else if ((menu = searchMenu(e->xmotion.window)) !=0) - menu->motionNotifyEvent(&e->xmotion); else if ((tab = searchTab(e->xmotion.window)) !=0) tab->motionNotifyEvent(&e->xmotion); - - + } break; case PropertyNotify: {

@@ -755,13 +752,11 @@ break;

case EnterNotify: { last_time = e->xcrossing.time; - BScreen *screen = (BScreen *) 0; - FluxboxWindow *win = (FluxboxWindow *) 0; - Basemenu *menu = (Basemenu *) 0; - - Tab *tab = (Tab *) 0; + BScreen *screen = 0; + FluxboxWindow *win = 0; + Tab *tab = 0; #ifdef SLIT - Slit *slit = (Slit *) 0; + Slit *slit = 0; #endif // SLIT if (e->xcrossing.mode == NotifyGrab)

@@ -789,11 +784,7 @@ win->installColormap(True);

ungrab(); } - } else if ((menu = searchMenu(e->xcrossing.window))) - menu->enterNotifyEvent(&e->xcrossing); - /* else if ((tbar = searchToolbar(e->xcrossing.window))) - tbar->enterNotifyEvent(&e->xcrossing); - */else if ((tab = searchTab(e->xcrossing.window))) { + } else if ((tab = searchTab(e->xcrossing.window))) { win = tab->getWindow(); if (win->getScreen()->isSloppyFocus() && (! win->isFocused()) && (! no_focus)) {

@@ -812,10 +803,6 @@ #ifdef SLIT

else if ((slit = searchSlit(e->xcrossing.window))) slit->enterNotifyEvent(&e->xcrossing); #endif // SLIT - else { - FbTk::EventManager::instance()->handleEvent(*e); - } - } break;

@@ -824,48 +811,32 @@ {

last_time = e->xcrossing.time; FluxboxWindow *win = (FluxboxWindow *) 0; - Basemenu *menu = (Basemenu *) 0; #ifdef SLIT Slit *slit = (Slit *) 0; #endif // SLIT - - if ((menu = searchMenu(e->xcrossing.window))) - menu->leaveNotifyEvent(&e->xcrossing); - else if ((win = searchWindow(e->xcrossing.window))) - win->installColormap(False); - /* else if ((tbar = searchToolbar(e->xcrossing.window))) - tbar->leaveNotifyEvent(&e->xcrossing); - */ + if ((win = searchWindow(e->xcrossing.window))) + win->installColormap(false); #ifdef SLIT else if ((slit = searchSlit(e->xcrossing.window))) slit->leaveNotifyEvent(&e->xcrossing); #endif // SLIT - else { - FbTk::EventManager::instance()->handleEvent(*e); - } } break; case Expose: { FluxboxWindow *win = (FluxboxWindow *) 0; - Basemenu *menu = (Basemenu *) 0; Tab *tab = 0; if ((win = searchWindow(e->xexpose.window))) win->exposeEvent(&e->xexpose); - else if ((menu = searchMenu(e->xexpose.window))) - menu->exposeEvent(&e->xexpose); else if ((tab = searchTab(e->xexpose.window))) tab->exposeEvent(&e->xexpose); - else - FbTk::EventManager::instance()->handleEvent(*e); } break; case KeyPress: handleKeyEvent(e->xkey); - FbTk::EventManager::instance()->handleEvent(*e); break; case ColormapNotify: { BScreen *screen = searchScreen(e->xcolormap.window);

@@ -903,7 +874,6 @@ (shape_event->kind != ShapeBounding))

win->shapeEvent(shape_event); } #endif // SHAPE - FbTk::EventManager::instance()->handleEvent(*e); } } }

@@ -915,7 +885,6 @@ {

last_time = be.time; FluxboxWindow *win = 0; - Basemenu *menu = 0; Tab *tab = 0; #ifdef SLIT Slit *slit = (Slit *) 0;

@@ -927,9 +896,6 @@ win->buttonPressEvent(&be);

if (be.button == 1) win->installColormap(True); - - } else if ((menu = searchMenu(be.window))) { - menu->buttonPressEvent(&be); } #ifdef SLIT else if ((slit = searchSlit(be.window))) {

@@ -1029,13 +995,10 @@ case ButtonRelease:

{ last_time = be.time; FluxboxWindow *win = (FluxboxWindow *) 0; - Basemenu *menu = (Basemenu *) 0; Tab *tab = 0; if ((win = searchWindow(be.window))) win->buttonReleaseEvent(&be); - else if ((menu = searchMenu(be.window))) - menu->buttonReleaseEvent(&be); else if ((tab = searchTab(be.window))) tab->buttonReleaseEvent(&be); }

@@ -1716,18 +1679,6 @@ std::map<Window, FluxboxWindow *>::iterator it = groupSearch.find(window);

return it == groupSearch.end() ? 0 : it->second; } - -Basemenu *Fluxbox::searchMenu(Window window) { - std::map<Window, Basemenu *>::iterator it = menuSearch.find(window); - return it == menuSearch.end() ? 0 : it->second; -} - - -Toolbar *Fluxbox::searchToolbar(Window window) { - std::map<Window, Toolbar *>::iterator it = toolbarSearch.find(window); - return it == toolbarSearch.end() ? 0 : it->second; -} - Tab *Fluxbox::searchTab(Window window) { std::map<Window, Tab *>::iterator it = tabSearch.find(window); return it == tabSearch.end() ? 0 : it->second;

@@ -1751,17 +1702,6 @@ void Fluxbox::saveGroupSearch(Window window, FluxboxWindow *data) {

groupSearch[window] = data; } - -void Fluxbox::saveMenuSearch(Window window, Basemenu *data) { - menuSearch[window] = data; -} - - -void Fluxbox::saveToolbarSearch(Window window, Toolbar *data) { - toolbarSearch[window] = data; -} - - void Fluxbox::saveTabSearch(Window window, Tab *data) { tabSearch[window] = data; }

@@ -1781,15 +1721,6 @@

void Fluxbox::removeGroupSearch(Window window) { groupSearch.erase(window); } - -void Fluxbox::removeMenuSearch(Window window) { - menuSearch.erase(window); -} - -void Fluxbox::removeToolbarSearch(Window window) { - toolbarSearch.erase(window); -} - void Fluxbox::removeTabSearch(Window window) { tabSearch.erase(window);
M src/fluxbox.hhsrc/fluxbox.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.hh,v 1.35 2002/12/01 13:42:07 rathnor Exp $ +// $Id: fluxbox.hh,v 1.36 2002/12/03 23:55:49 fluxgen Exp $ #ifndef FLUXBOX_HH #define FLUXBOX_HH

@@ -98,8 +98,6 @@ inline Atom getKWM2DockwindowAtom() const { return kwm2_dockwindow; } //KDE v2.x

#endif #endif // HAVE_GETPID - Basemenu *searchMenu(Window); - FluxboxWindow *searchGroup(Window, FluxboxWindow *); FluxboxWindow *searchWindow(Window); inline FluxboxWindow *getFocusedWindow() { return focused_window; }

@@ -110,7 +108,6 @@

inline const Time &getDoubleClickInterval() const { return resource.double_click_interval; } inline const Time &getLastTime() const { return last_time; } - Toolbar *searchToolbar(Window w); Tab *searchTab(Window); /// obsolete

@@ -142,15 +139,11 @@ void saveStyleFilename(const char *val) { m_rc_stylefile = (val == 0 ? "" : val); }

void saveMenuFilename(const char *); void saveTitlebarFilename(const char *); void saveSlitlistFilename(const char *val) { m_rc_slitlistfile = (val == 0 ? "" : val); } - void saveMenuSearch(Window, Basemenu *); void saveWindowSearch(Window, FluxboxWindow *); - void saveToolbarSearch(Window, Toolbar *); void saveTabSearch(Window, Tab *); void saveGroupSearch(Window, FluxboxWindow *); void save_rc(); - void removeMenuSearch(Window); void removeWindowSearch(Window); - void removeToolbarSearch(Window); void removeTabSearch(Window); void removeGroupSearch(Window); void restart(const char * = 0);

@@ -237,8 +230,6 @@ void setTitlebar(std::vector<Fluxbox::Titlebar>& dir, const char *arg);

std::map<Window, FluxboxWindow *> windowSearch; std::map<Window, FluxboxWindow *> groupSearch; - std::map<Window, Basemenu *> menuSearch; - std::map<Window, Toolbar *> toolbarSearch; typedef std::map<Window, Tab *> TabList; TabList tabSearch;