summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fluxbox.cc70
-rw-r--r--src/fluxbox.hh8
2 files changed, 53 insertions, 25 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index dbde663..cf3a6d4 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.cc,v 1.54 2002/04/28 18:57:10 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.55 2002/05/02 07:14:21 fluxgen Exp $
26 26
27//Use GNU extensions 27//Use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -609,7 +609,7 @@ void Fluxbox::process_event(XEvent *e) {
609 609
610 if (iskdedockapp) { 610 if (iskdedockapp) {
611 XSelectInput(getXDisplay(), e->xmaprequest.window, StructureNotifyMask); 611 XSelectInput(getXDisplay(), e->xmaprequest.window, StructureNotifyMask);
612 std::list<BScreen *>::iterator it = screenList.begin(); 612 ScreenList::iterator it = screenList.begin();
613 for (; (*it) == screenList.back(); ++it) { 613 for (; (*it) == screenList.back(); ++it) {
614 (*it)->getSlit()->addClient(e->xmaprequest.window); 614 (*it)->getSlit()->addClient(e->xmaprequest.window);
615 } 615 }
@@ -897,8 +897,8 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
897 } else if ((tab = searchTab(be.window))) { 897 } else if ((tab = searchTab(be.window))) {
898 tab->buttonPressEvent(&be); 898 tab->buttonPressEvent(&be);
899 } else { 899 } else {
900 std::list<BScreen *>::iterator it = screenList.begin(); 900 ScreenList::iterator it = screenList.begin();
901 std::list<BScreen *>::iterator it_end = screenList.end(); 901 ScreenList::iterator it_end = screenList.end();
902 902
903 for (; it != it_end; ++it) { 903 for (; it != it_end; ++it) {
904 904
@@ -1023,7 +1023,7 @@ void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) {
1023 1023
1024 if (win->unmapNotifyEvent(&ue)) 1024 if (win->unmapNotifyEvent(&ue))
1025 delete win; 1025 delete win;
1026 1026
1027 } 1027 }
1028 #ifdef SLIT 1028 #ifdef SLIT
1029 else if ((slit = searchSlit(ue.window))!=0) { 1029 else if ((slit = searchSlit(ue.window))!=0) {
@@ -1131,14 +1131,14 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1131 1131
1132 switch (action) { 1132 switch (action) {
1133 case Keys::WORKSPACE: 1133 case Keys::WORKSPACE:
1134 // Workspace1 has id 0, hence -1 1134 // Workspace1 has id 0, hence -1
1135 screen->changeWorkspaceID(key->getParam()-1); 1135 screen->changeWorkspaceID(key->getParam()-1);
1136 break; 1136 break;
1137 case Keys::SENDTOWORKSPACE: 1137 case Keys::SENDTOWORKSPACE:
1138 // Workspace1 has id 0, hence -1 1138 // Workspace1 has id 0, hence -1
1139 screen->sendToWorkspace(key->getParam()-1); 1139 screen->sendToWorkspace(key->getParam()-1);
1140 break; 1140 break;
1141 // NOTE!!! The WORKSPACEn commands are not needed anymore 1141 // NOTE!!! The WORKSPACEn commands are not needed anymore
1142 case Keys::WORKSPACE1: 1142 case Keys::WORKSPACE1:
1143 screen->changeWorkspaceID(0); 1143 screen->changeWorkspaceID(0);
1144 break; 1144 break;
@@ -1193,9 +1193,11 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1193 break; 1193 break;
1194 case Keys::NEXTWINDOW: //activate next window 1194 case Keys::NEXTWINDOW: //activate next window
1195 screen->nextFocus(key->getParam()); 1195 screen->nextFocus(key->getParam());
1196 focused_window->getTab()->raise();
1196 break; 1197 break;
1197 case Keys::PREVWINDOW: //activate prev window 1198 case Keys::PREVWINDOW: //activate prev window
1198 screen->prevFocus(key->getParam()); 1199 screen->prevFocus(key->getParam());
1200 focused_window->getTab()->raise();
1199 break; 1201 break;
1200 case Keys::NEXTTAB: 1202 case Keys::NEXTTAB:
1201 if (focused_window && focused_window->getTab()) { 1203 if (focused_window && focused_window->getTab()) {
@@ -1225,6 +1227,32 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1225 } 1227 }
1226 } 1228 }
1227 break; 1229 break;
1230 case Keys::FIRSTTAB:
1231 if (focused_window && focused_window->getTab()) {
1232 Tab *tab = focused_window->getTab();
1233 screen->getCurrentWorkspace()->raiseWindow(
1234 tab->first()->getWindow());
1235 tab->first()->getWindow()->setInputFocus();
1236 }
1237 break;
1238 case Keys::LASTTAB:
1239 if (focused_window && focused_window->getTab()) {
1240 Tab *tab = focused_window->getTab();
1241 screen->getCurrentWorkspace()->raiseWindow(
1242 tab->last()->getWindow());
1243 tab->last()->getWindow()->setInputFocus();
1244 }
1245 break;
1246 case Keys::MOVETABPREV:
1247 if (focused_window && focused_window->getTab()) {
1248 focused_window->getTab()->movePrev();
1249 }
1250 break;
1251 case Keys::MOVETABNEXT:
1252 if (focused_window && focused_window->getTab()) {
1253 focused_window->getTab()->moveNext();
1254 }
1255 break;
1228 case Keys::EXECUTE: //execute command on keypress 1256 case Keys::EXECUTE: //execute command on keypress
1229 { 1257 {
1230 #ifndef __EMX__ 1258 #ifndef __EMX__
@@ -1247,8 +1275,8 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1247 break; 1275 break;
1248 case Keys::ROOTMENU: //show root menu 1276 case Keys::ROOTMENU: //show root menu
1249 { 1277 {
1250 std::list<BScreen *>::iterator it = screenList.begin(); 1278 ScreenList::iterator it = screenList.begin();
1251 std::list<BScreen *>::iterator it_end = screenList.end(); 1279 ScreenList::iterator it_end = screenList.end();
1252 1280
1253 for (; it != it_end; ++it) { 1281 for (; it != it_end; ++it) {
1254 1282
@@ -1364,7 +1392,7 @@ void Fluxbox::doWindowAction(Keys::KeyAction action, const int param) {
1364 focused_window->getXFrame(), focused_window->getYFrame()+param, 1392 focused_window->getXFrame(), focused_window->getYFrame()+param,
1365 focused_window->getWidth(), focused_window->getHeight()); 1393 focused_window->getWidth(), focused_window->getHeight());
1366 break; 1394 break;
1367 // NOTE !!! BIGNUDGExxxx is not needed, just use 10 as a parameter 1395 // NOTE !!! BIGNUDGExxxx is not needed, just use 10 as a parameter
1368 case Keys::BIGNUDGERIGHT: 1396 case Keys::BIGNUDGERIGHT:
1369 focused_window->configure( 1397 focused_window->configure(
1370 focused_window->getXFrame()+10, focused_window->getYFrame(), 1398 focused_window->getXFrame()+10, focused_window->getYFrame(),
@@ -1554,8 +1582,8 @@ Bool Fluxbox::handleSignal(int sig) {
1554 1582
1555BScreen *Fluxbox::searchScreen(Window window) { 1583BScreen *Fluxbox::searchScreen(Window window) {
1556 BScreen *screen = (BScreen *) 0; 1584 BScreen *screen = (BScreen *) 0;
1557 std::list<BScreen *>::iterator it = screenList.begin(); 1585 ScreenList::iterator it = screenList.begin();
1558 std::list<BScreen *>::iterator it_end = screenList.end(); 1586 ScreenList::iterator it_end = screenList.end();
1559 1587
1560 for (; it != it_end; ++it) { 1588 for (; it != it_end; ++it) {
1561 if (*it) { 1589 if (*it) {
@@ -1689,8 +1717,8 @@ void Fluxbox::shutdown(void) {
1689 XSetInputFocus(getXDisplay(), PointerRoot, None, CurrentTime); 1717 XSetInputFocus(getXDisplay(), PointerRoot, None, CurrentTime);
1690 1718
1691 //send shutdown to all screens 1719 //send shutdown to all screens
1692 std::list<BScreen *>::iterator it = screenList.begin(); 1720 ScreenList::iterator it = screenList.begin();
1693 std::list<BScreen *>::iterator it_end = screenList.end(); 1721 ScreenList::iterator it_end = screenList.end();
1694 for (; it != it_end; ++it) { 1722 for (; it != it_end; ++it) {
1695 if(*it) 1723 if(*it)
1696 (*it)->shutdown(); 1724 (*it)->shutdown();
@@ -1732,8 +1760,8 @@ void Fluxbox::save_rc(void) {
1732 (resource.auto_raise_delay.tv_usec / 1000))); 1760 (resource.auto_raise_delay.tv_usec / 1000)));
1733 XrmPutLineResource(&new_blackboxrc, rc_string); 1761 XrmPutLineResource(&new_blackboxrc, rc_string);
1734 1762
1735 std::list<BScreen *>::iterator it = screenList.begin(); 1763 ScreenList::iterator it = screenList.begin();
1736 std::list<BScreen *>::iterator it_end = screenList.end(); 1764 ScreenList::iterator it_end = screenList.end();
1737 1765
1738 //Save screen resources 1766 //Save screen resources
1739 1767
@@ -2265,8 +2293,8 @@ void Fluxbox::real_reconfigure(void) {
2265 } 2293 }
2266 menuTimestamps.erase(menuTimestamps.begin(), menuTimestamps.end()); 2294 menuTimestamps.erase(menuTimestamps.begin(), menuTimestamps.end());
2267 2295
2268 std::list<BScreen *>::iterator sit = screenList.begin(); 2296 ScreenList::iterator sit = screenList.begin();
2269 std::list<BScreen *>::iterator sit_end = screenList.end(); 2297 ScreenList::iterator sit_end = screenList.end();
2270 for (; sit != sit_end; ++sit) 2298 for (; sit != sit_end; ++sit)
2271 (*sit)->reconfigure(); 2299 (*sit)->reconfigure();
2272 2300
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index 1a16d18..e9448dd 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.hh,v 1.17 2002/04/28 18:55:43 fluxgen Exp $ 25// $Id: fluxbox.hh,v 1.18 2002/05/02 07:14:22 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -209,13 +209,13 @@ private:
209 typedef std::map<Window, Tab *> TabList; 209 typedef std::map<Window, Tab *> TabList;
210 TabList tabSearch; 210 TabList tabSearch;
211 211
212#ifdef SLIT 212#ifdef SLIT
213 std::map<Window, Slit *> slitSearch; 213 std::map<Window, Slit *> slitSearch;
214# ifdef KDE 214#ifdef KDE
215 //For KDE dock applets 215 //For KDE dock applets
216 Atom kwm1_dockwindow; //KDE v1.x 216 Atom kwm1_dockwindow; //KDE v1.x
217 Atom kwm2_dockwindow; //KDE v2.x 217 Atom kwm2_dockwindow; //KDE v2.x
218# endif//KDE 218#endif//KDE
219#endif // SLIT 219#endif // SLIT
220 220
221 std::list<MenuTimestamp *> menuTimestamps; 221 std::list<MenuTimestamp *> menuTimestamps;