diff options
author | rathnor <rathnor> | 2003-04-26 05:42:36 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-04-26 05:42:36 (GMT) |
commit | 68ffc78978a3e2aef2b47e4831e7851f3ca51918 (patch) | |
tree | 73f4e7ad5996c984f4643e6eb06e991795185632 | |
parent | 564ad8d06ddfddbc363e434485fa30dbc4120917 (diff) | |
download | fluxbox_pavel-68ffc78978a3e2aef2b47e4831e7851f3ca51918.zip fluxbox_pavel-68ffc78978a3e2aef2b47e4831e7851f3ca51918.tar.bz2 |
Add code for remember functionality (Simon)
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | RoadMap | 2 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/Screen.cc | 4 | ||||
-rw-r--r-- | src/Window.cc | 43 | ||||
-rw-r--r-- | src/Window.hh | 20 | ||||
-rw-r--r-- | src/fluxbox.cc | 53 |
7 files changed, 89 insertions, 43 deletions
@@ -1,5 +1,11 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.2: | 2 | Changes for 0.9.2: |
3 | *03/04/26: | ||
4 | * Add remember patch integration code (Simon) | ||
5 | - note: does not include "startup" menu | ||
6 | - save on close disabled atm, due to other issues... | ||
7 | - enabled in configure by default, disable with --disable-remember | ||
8 | Makefile.am Remember.hh/cc Screen.cc Window.hh/cc fluxbox.cc | ||
3 | *03/04/25: | 9 | *03/04/25: |
4 | * Fix small gcc 3.3 build issue (Simon) | 10 | * Fix small gcc 3.3 build issue (Simon) |
5 | Window.hh/cc | 11 | Window.hh/cc |
@@ -99,7 +99,7 @@ Bugfixes/lower priority: | |||
99 | Release: 0.9.2 | 99 | Release: 0.9.2 |
100 | Approx Date: 5 May, 2003 | 100 | Approx Date: 5 May, 2003 |
101 | Major Features: | 101 | Major Features: |
102 | - Integration of Remember patch (Simon) | 102 | + Integration of Remember patch (Simon) |
103 | * Transparency (Henrik) | 103 | * Transparency (Henrik) |
104 | Minor Features: | 104 | Minor Features: |
105 | - more keybinding actions (Both) | 105 | - more keybinding actions (Both) |
diff --git a/src/Makefile.am b/src/Makefile.am index 8dd4684..38d5b48 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -69,6 +69,8 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ | |||
69 | WinButton.hh WinButton.cc Window.cc Window.hh \ | 69 | WinButton.hh WinButton.cc Window.cc Window.hh \ |
70 | Workspace.cc Workspace.hh \ | 70 | Workspace.cc Workspace.hh \ |
71 | XrmDatabaseHelper.hh FbCommands.hh FbCommands.cc LayerMenu.hh \ | 71 | XrmDatabaseHelper.hh FbCommands.hh FbCommands.cc LayerMenu.hh \ |
72 | IntResMenuItem.hh IntResMenuItem.cc FbMenu.hh WinClient.hh WinClient.cc | 72 | IntResMenuItem.hh IntResMenuItem.cc FbMenu.hh \ |
73 | WinClient.hh WinClient.cc \ | ||
74 | Remember.hh Remember.cc | ||
73 | 75 | ||
74 | LDADD=FbTk/libFbTk.a | 76 | LDADD=FbTk/libFbTk.a |
diff --git a/src/Screen.cc b/src/Screen.cc index de5e655..226c352 100644 --- a/src/Screen.cc +++ b/src/Screen.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: Screen.cc,v 1.135 2003/04/25 17:39:00 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.136 2003/04/26 05:42:35 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -1260,8 +1260,8 @@ FluxboxWindow *BScreen::createWindow(Window client) { | |||
1260 | 1260 | ||
1261 | //TODO: is next line needed? | 1261 | //TODO: is next line needed? |
1262 | Fluxbox::instance()->saveWindowSearch(client, win); | 1262 | Fluxbox::instance()->saveWindowSearch(client, win); |
1263 | Fluxbox::instance()->attachSignals(*win); | ||
1264 | setupWindowActions(*win); | 1263 | setupWindowActions(*win); |
1264 | Fluxbox::instance()->attachSignals(*win); | ||
1265 | } | 1265 | } |
1266 | if (win->getWorkspaceNumber() == getCurrentWorkspaceID() || win->isStuck()) { | 1266 | if (win->getWorkspaceNumber() == getCurrentWorkspaceID() || win->isStuck()) { |
1267 | win->show(); | 1267 | win->show(); |
diff --git a/src/Window.cc b/src/Window.cc index 10db141..b6e29c7 100644 --- a/src/Window.cc +++ b/src/Window.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: Window.cc,v 1.148 2003/04/25 16:11:00 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.149 2003/04/26 05:42:35 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -2556,6 +2556,47 @@ void FluxboxWindow::toggleDecoration() { | |||
2556 | } | 2556 | } |
2557 | } | 2557 | } |
2558 | 2558 | ||
2559 | unsigned int FluxboxWindow::getDecorationMask() const { | ||
2560 | unsigned int ret = 0; | ||
2561 | if (decorations.titlebar) | ||
2562 | ret |= DECORM_TITLEBAR; | ||
2563 | if (decorations.handle) | ||
2564 | ret |= DECORM_HANDLE; | ||
2565 | if (decorations.border) | ||
2566 | ret |= DECORM_BORDER; | ||
2567 | if (decorations.iconify) | ||
2568 | ret |= DECORM_ICONIFY; | ||
2569 | if (decorations.maximize) | ||
2570 | ret |= DECORM_MAXIMIZE; | ||
2571 | if (decorations.close) | ||
2572 | ret |= DECORM_CLOSE; | ||
2573 | if (decorations.menu) | ||
2574 | ret |= DECORM_MENU; | ||
2575 | if (decorations.sticky) | ||
2576 | ret |= DECORM_STICKY; | ||
2577 | if (decorations.shade) | ||
2578 | ret |= DECORM_SHADE; | ||
2579 | if (decorations.tab) | ||
2580 | ret |= DECORM_TAB; | ||
2581 | if (decorations.enabled) | ||
2582 | ret |= DECORM_ENABLED; | ||
2583 | return ret; | ||
2584 | } | ||
2585 | |||
2586 | void FluxboxWindow::setDecorationMask(unsigned int mask) { | ||
2587 | decorations.titlebar = mask & DECORM_TITLEBAR; | ||
2588 | decorations.handle = mask & DECORM_HANDLE; | ||
2589 | decorations.border = mask & DECORM_BORDER; | ||
2590 | decorations.iconify = mask & DECORM_ICONIFY; | ||
2591 | decorations.maximize = mask & DECORM_MAXIMIZE; | ||
2592 | decorations.close = mask & DECORM_CLOSE; | ||
2593 | decorations.menu = mask & DECORM_MENU; | ||
2594 | decorations.sticky = mask & DECORM_STICKY; | ||
2595 | decorations.shade = mask & DECORM_SHADE; | ||
2596 | decorations.tab = mask & DECORM_TAB; | ||
2597 | decorations.enabled = mask & DECORM_ENABLED; | ||
2598 | } | ||
2599 | |||
2559 | bool FluxboxWindow::validateClient() { | 2600 | bool FluxboxWindow::validateClient() { |
2560 | XSync(display, false); | 2601 | XSync(display, false); |
2561 | 2602 | ||
diff --git a/src/Window.hh b/src/Window.hh index 16e606d..4884a1e 100644 --- a/src/Window.hh +++ b/src/Window.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: Window.hh,v 1.61 2003/04/25 11:27:13 rathnor Exp $ | 25 | // $Id: Window.hh,v 1.62 2003/04/26 05:42:36 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef WINDOW_HH | 27 | #ifndef WINDOW_HH |
28 | #define WINDOW_HH | 28 | #define WINDOW_HH |
@@ -204,6 +204,24 @@ public: | |||
204 | void setDecoration(Decoration decoration); | 204 | void setDecoration(Decoration decoration); |
205 | void toggleDecoration(); | 205 | void toggleDecoration(); |
206 | 206 | ||
207 | enum DecorationMask { | ||
208 | DECORM_TITLEBAR = (1<<0), | ||
209 | DECORM_HANDLE = (1<<1), | ||
210 | DECORM_BORDER = (1<<2), | ||
211 | DECORM_ICONIFY = (1<<3), | ||
212 | DECORM_MAXIMIZE = (1<<4), | ||
213 | DECORM_CLOSE = (1<<5), | ||
214 | DECORM_MENU = (1<<6), | ||
215 | DECORM_STICKY = (1<<7), | ||
216 | DECORM_SHADE = (1<<8), | ||
217 | DECORM_TAB = (1<<9), | ||
218 | DECORM_ENABLED = (1<<10), | ||
219 | DECORM_LAST = (1<<11) // useful for getting "All" | ||
220 | }; | ||
221 | |||
222 | unsigned int getDecorationMask() const; | ||
223 | void setDecorationMask(unsigned int mask); | ||
224 | |||
207 | #ifdef SHAPE | 225 | #ifdef SHAPE |
208 | void shapeEvent(XShapeEvent *event); | 226 | void shapeEvent(XShapeEvent *event); |
209 | #endif // SHAPE | 227 | #endif // SHAPE |
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 68e098b..5512af3 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.118 2003/04/25 16:00:03 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.119 2003/04/26 05:42:36 rathnor Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -59,7 +59,10 @@ | |||
59 | #endif // USE_GNOME | 59 | #endif // USE_GNOME |
60 | #ifdef USE_NEWWMSPEC | 60 | #ifdef USE_NEWWMSPEC |
61 | #include "Ewmh.hh" | 61 | #include "Ewmh.hh" |
62 | #endif //USE_NEWWMSPEC | 62 | #endif // USE_NEWWMSPEC |
63 | #ifdef REMEMBER | ||
64 | #include "Remember.hh" | ||
65 | #endif // REMEMBER | ||
63 | 66 | ||
64 | // X headers | 67 | // X headers |
65 | #include <X11/Xlib.h> | 68 | #include <X11/Xlib.h> |
@@ -421,6 +424,9 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile | |||
421 | #ifdef USE_NEWWMSPEC | 424 | #ifdef USE_NEWWMSPEC |
422 | addAtomHandler(new Ewmh()); // for Extended window manager atom support | 425 | addAtomHandler(new Ewmh()); // for Extended window manager atom support |
423 | #endif // USE_NEWWMSPEC | 426 | #endif // USE_NEWWMSPEC |
427 | #ifdef REMEMBER | ||
428 | m_atomhandler.push_back(new Remember()); // for remembering window attribs | ||
429 | #endif // REMEMBER | ||
424 | 430 | ||
425 | grab(); | 431 | grab(); |
426 | 432 | ||
@@ -1514,7 +1520,7 @@ void Fluxbox::update(FbTk::Subject *changedsub) { | |||
1514 | //!! TODO | 1520 | //!! TODO |
1515 | #ifdef DEBUG | 1521 | #ifdef DEBUG |
1516 | cerr<<__FILE__<<"("<<__FUNCTION__<<") TODO: signal stuff for client death!!"<<endl; | 1522 | cerr<<__FILE__<<"("<<__FUNCTION__<<") TODO: signal stuff for client death!!"<<endl; |
1517 | #endif // DEBUG | 1523 | #endif // DEBUG |
1518 | } | 1524 | } |
1519 | } | 1525 | } |
1520 | 1526 | ||
@@ -1660,43 +1666,16 @@ void Fluxbox::save_rc() { | |||
1660 | for (; it != it_end; ++it) { | 1666 | for (; it != it_end; ++it) { |
1661 | BScreen *screen = *it; | 1667 | BScreen *screen = *it; |
1662 | int screen_number = screen->getScreenNumber(); | 1668 | int screen_number = screen->getScreenNumber(); |
1663 | 1669 | ||
1664 | /* | 1670 | /* |
1665 | #ifdef SLIT | 1671 | #ifdef SLIT |
1666 | string slit_placement; | 1672 | #ifdef XINERAMA |
1667 | 1673 | sprintf(rc_string, "session.screen%d.slit.onHead: %d", screen_number, | |
1668 | switch (screen->getSlitPlacement()) { | 1674 | screen->getSlitOnHead()); |
1669 | case Slit::TOPLEFT: slit_placement = "TopLeft"; break; | ||
1670 | case Slit::CENTERLEFT: slit_placement = "CenterLeft"; break; | ||
1671 | case Slit::BOTTOMLEFT: slit_placement = "BottomLeft"; break; | ||
1672 | case Slit::TOPCENTER: slit_placement = "TopCenter"; break; | ||
1673 | case Slit::BOTTOMCENTER: slit_placement = "BottomCenter"; break; | ||
1674 | case Slit::TOPRIGHT: slit_placement = "TopRight"; break; | ||
1675 | case Slit::BOTTOMRIGHT: slit_placement = "BottomRight"; break; | ||
1676 | case Slit::CENTERRIGHT: default: slit_placement = "CenterRight"; break; | ||
1677 | } | ||
1678 | |||
1679 | sprintf(rc_string, "session.screen%d.slit.placement: %s", screen_number, | ||
1680 | slit_placement.c_str()); | ||
1681 | XrmPutLineResource(&new_blackboxrc, rc_string); | ||
1682 | |||
1683 | sprintf(rc_string, "session.screen%d.slit.direction: %s", screen_number, | ||
1684 | ((screen->getSlitDirection() == Slit::HORIZONTAL) ? "Horizontal" : | ||
1685 | "Vertical")); | ||
1686 | XrmPutLineResource(&new_blackboxrc, rc_string); | 1675 | XrmPutLineResource(&new_blackboxrc, rc_string); |
1687 | 1676 | #endif // XINERAMA | |
1688 | sprintf(rc_string, "session.screen%d.slit.autoHide: %s", screen_number, | ||
1689 | ((screen->getSlit()->doAutoHide()) ? "True" : "False")); | ||
1690 | XrmPutLineResource(&new_blackboxrc, rc_string); | ||
1691 | /* | ||
1692 | #ifdef XINERAMA | ||
1693 | sprintf(rc_string, "session.screen%d.slit.onHead: %d", screen_number, | ||
1694 | screen->getSlitOnHead()); | ||
1695 | XrmPutLineResource(&new_blackboxrc, rc_string); | ||
1696 | #endif // XINERAMA | ||
1697 | *//* | ||
1698 | #endif // SLIT | 1677 | #endif // SLIT |
1699 | */ | 1678 | */ |
1700 | sprintf(rc_string, "session.screen%d.rowPlacementDirection: %s", screen_number, | 1679 | sprintf(rc_string, "session.screen%d.rowPlacementDirection: %s", screen_number, |
1701 | ((screen->getRowPlacementDirection() == BScreen::LEFTRIGHT) ? | 1680 | ((screen->getRowPlacementDirection() == BScreen::LEFTRIGHT) ? |
1702 | "LeftToRight" : "RightToLeft")); | 1681 | "LeftToRight" : "RightToLeft")); |