removed menu and toolbar functions
This commit is contained in:
parent
ec1947ccc1
commit
044713cd75
2 changed files with 13 additions and 91 deletions
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
|
||||
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 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
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 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
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 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
|
||||
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 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
else if ((slit = searchSlit(e->xcrossing.window)))
|
||||
slit->enterNotifyEvent(&e->xcrossing);
|
||||
#endif // SLIT
|
||||
else {
|
||||
FbTk::EventManager::instance()->handleEvent(*e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
@ -824,48 +811,32 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
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 @@ void Fluxbox::handleEvent(XEvent * const e) {
|
|||
win->shapeEvent(shape_event);
|
||||
}
|
||||
#endif // SHAPE
|
||||
FbTk::EventManager::instance()->handleEvent(*e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -915,7 +885,6 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
|
|||
last_time = be.time;
|
||||
|
||||
FluxboxWindow *win = 0;
|
||||
Basemenu *menu = 0;
|
||||
Tab *tab = 0;
|
||||
#ifdef SLIT
|
||||
Slit *slit = (Slit *) 0;
|
||||
|
@ -927,9 +896,6 @@ void Fluxbox::handleButtonEvent(XButtonEvent &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 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
|
|||
{
|
||||
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 @@ FluxboxWindow *Fluxbox::searchGroup(Window window, FluxboxWindow *win) {
|
|||
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;
|
||||
}
|
||||
|
@ -1782,15 +1722,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);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ public:
|
|||
#endif
|
||||
#endif // HAVE_GETPID
|
||||
|
||||
Basemenu *searchMenu(Window);
|
||||
|
||||
FluxboxWindow *searchGroup(Window, FluxboxWindow *);
|
||||
FluxboxWindow *searchWindow(Window);
|
||||
inline FluxboxWindow *getFocusedWindow() { return focused_window; }
|
||||
|
@ -110,7 +108,6 @@ public:
|
|||
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 @@ public:
|
|||
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 @@ private:
|
|||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue