all repos — fluxbox @ 68ffc78978a3e2aef2b47e4831e7851f3ca51918

custom fork of the fluxbox windowmanager

Add code for remember functionality (Simon)
rathnor rathnor
commit

68ffc78978a3e2aef2b47e4831e7851f3ca51918

parent

564ad8d06ddfddbc363e434485fa30dbc4120917

7 files changed, 89 insertions(+), 43 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,11 @@

(Format: Year/Month/Day) Changes for 0.9.2: +*03/04/26: + * Add remember patch integration code (Simon) + - note: does not include "startup" menu + - save on close disabled atm, due to other issues... + - enabled in configure by default, disable with --disable-remember + Makefile.am Remember.hh/cc Screen.cc Window.hh/cc fluxbox.cc *03/04/25: * Fix small gcc 3.3 build issue (Simon) Window.hh/cc
M RoadMapRoadMap

@@ -99,7 +99,7 @@ ----------------------------------------------------------

Release: 0.9.2 Approx Date: 5 May, 2003 Major Features: - - Integration of Remember patch (Simon) + + Integration of Remember patch (Simon) * Transparency (Henrik) Minor Features: - more keybinding actions (Both)
M src/Makefile.amsrc/Makefile.am

@@ -69,6 +69,8 @@ ToolbarTheme.hh ToolbarTheme.cc \

WinButton.hh WinButton.cc Window.cc Window.hh \ Workspace.cc Workspace.hh \ XrmDatabaseHelper.hh FbCommands.hh FbCommands.cc LayerMenu.hh \ - IntResMenuItem.hh IntResMenuItem.cc FbMenu.hh WinClient.hh WinClient.cc + IntResMenuItem.hh IntResMenuItem.cc FbMenu.hh \ + WinClient.hh WinClient.cc \ + Remember.hh Remember.cc LDADD=FbTk/libFbTk.a
M src/Screen.ccsrc/Screen.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: Screen.cc,v 1.135 2003/04/25 17:39:00 fluxgen Exp $ +// $Id: Screen.cc,v 1.136 2003/04/26 05:42:35 rathnor Exp $ #include "Screen.hh"

@@ -1260,8 +1260,8 @@ focused_list.push_back(&win->winClient());

//TODO: is next line needed? Fluxbox::instance()->saveWindowSearch(client, win); - Fluxbox::instance()->attachSignals(*win); setupWindowActions(*win); + Fluxbox::instance()->attachSignals(*win); } if (win->getWorkspaceNumber() == getCurrentWorkspaceID() || win->isStuck()) { win->show();
M src/Window.ccsrc/Window.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: Window.cc,v 1.148 2003/04/25 16:11:00 fluxgen Exp $ +// $Id: Window.cc,v 1.149 2003/04/26 05:42:35 rathnor Exp $ #include "Window.hh"

@@ -2554,6 +2554,47 @@ setDecoration(old_decoration);

} decorations.enabled = true; } +} + +unsigned int FluxboxWindow::getDecorationMask() const { + unsigned int ret = 0; + if (decorations.titlebar) + ret |= DECORM_TITLEBAR; + if (decorations.handle) + ret |= DECORM_HANDLE; + if (decorations.border) + ret |= DECORM_BORDER; + if (decorations.iconify) + ret |= DECORM_ICONIFY; + if (decorations.maximize) + ret |= DECORM_MAXIMIZE; + if (decorations.close) + ret |= DECORM_CLOSE; + if (decorations.menu) + ret |= DECORM_MENU; + if (decorations.sticky) + ret |= DECORM_STICKY; + if (decorations.shade) + ret |= DECORM_SHADE; + if (decorations.tab) + ret |= DECORM_TAB; + if (decorations.enabled) + ret |= DECORM_ENABLED; + return ret; +} + +void FluxboxWindow::setDecorationMask(unsigned int mask) { + decorations.titlebar = mask & DECORM_TITLEBAR; + decorations.handle = mask & DECORM_HANDLE; + decorations.border = mask & DECORM_BORDER; + decorations.iconify = mask & DECORM_ICONIFY; + decorations.maximize = mask & DECORM_MAXIMIZE; + decorations.close = mask & DECORM_CLOSE; + decorations.menu = mask & DECORM_MENU; + decorations.sticky = mask & DECORM_STICKY; + decorations.shade = mask & DECORM_SHADE; + decorations.tab = mask & DECORM_TAB; + decorations.enabled = mask & DECORM_ENABLED; } bool FluxboxWindow::validateClient() {
M src/Window.hhsrc/Window.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: Window.hh,v 1.61 2003/04/25 11:27:13 rathnor Exp $ +// $Id: Window.hh,v 1.62 2003/04/26 05:42:36 rathnor Exp $ #ifndef WINDOW_HH #define WINDOW_HH

@@ -204,6 +204,24 @@

void setDecoration(Decoration decoration); void toggleDecoration(); + enum DecorationMask { + DECORM_TITLEBAR = (1<<0), + DECORM_HANDLE = (1<<1), + DECORM_BORDER = (1<<2), + DECORM_ICONIFY = (1<<3), + DECORM_MAXIMIZE = (1<<4), + DECORM_CLOSE = (1<<5), + DECORM_MENU = (1<<6), + DECORM_STICKY = (1<<7), + DECORM_SHADE = (1<<8), + DECORM_TAB = (1<<9), + DECORM_ENABLED = (1<<10), + DECORM_LAST = (1<<11) // useful for getting "All" + }; + + unsigned int getDecorationMask() const; + void setDecorationMask(unsigned int mask); + #ifdef SHAPE void shapeEvent(XShapeEvent *event); #endif // SHAPE
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.118 2003/04/25 16:00:03 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.119 2003/04/26 05:42:36 rathnor Exp $ #include "fluxbox.hh"

@@ -59,7 +59,10 @@ #include "Gnome.hh"

#endif // USE_GNOME #ifdef USE_NEWWMSPEC #include "Ewmh.hh" -#endif //USE_NEWWMSPEC +#endif // USE_NEWWMSPEC +#ifdef REMEMBER +#include "Remember.hh" +#endif // REMEMBER // X headers #include <X11/Xlib.h>

@@ -421,6 +424,9 @@

#ifdef USE_NEWWMSPEC addAtomHandler(new Ewmh()); // for Extended window manager atom support #endif // USE_NEWWMSPEC +#ifdef REMEMBER + m_atomhandler.push_back(new Remember()); // for remembering window attribs +#endif // REMEMBER grab();

@@ -1514,7 +1520,7 @@ removeWindowSearch(client.window());

//!! TODO #ifdef DEBUG cerr<<__FILE__<<"("<<__FUNCTION__<<") TODO: signal stuff for client death!!"<<endl; -#endif // DEBUG +#endif // DEBUG } }

@@ -1660,43 +1666,16 @@

for (; it != it_end; ++it) { BScreen *screen = *it; int screen_number = screen->getScreenNumber(); - -/* + + /* #ifdef SLIT - string slit_placement; - - switch (screen->getSlitPlacement()) { - case Slit::TOPLEFT: slit_placement = "TopLeft"; break; - case Slit::CENTERLEFT: slit_placement = "CenterLeft"; break; - case Slit::BOTTOMLEFT: slit_placement = "BottomLeft"; break; - case Slit::TOPCENTER: slit_placement = "TopCenter"; break; - case Slit::BOTTOMCENTER: slit_placement = "BottomCenter"; break; - case Slit::TOPRIGHT: slit_placement = "TopRight"; break; - case Slit::BOTTOMRIGHT: slit_placement = "BottomRight"; break; - case Slit::CENTERRIGHT: default: slit_placement = "CenterRight"; break; - } - - sprintf(rc_string, "session.screen%d.slit.placement: %s", screen_number, - slit_placement.c_str()); - XrmPutLineResource(&new_blackboxrc, rc_string); - - sprintf(rc_string, "session.screen%d.slit.direction: %s", screen_number, - ((screen->getSlitDirection() == Slit::HORIZONTAL) ? "Horizontal" : - "Vertical")); - XrmPutLineResource(&new_blackboxrc, rc_string); - - sprintf(rc_string, "session.screen%d.slit.autoHide: %s", screen_number, - ((screen->getSlit()->doAutoHide()) ? "True" : "False")); + #ifdef XINERAMA + sprintf(rc_string, "session.screen%d.slit.onHead: %d", screen_number, + screen->getSlitOnHead()); XrmPutLineResource(&new_blackboxrc, rc_string); - /* - #ifdef XINERAMA - sprintf(rc_string, "session.screen%d.slit.onHead: %d", screen_number, - screen->getSlitOnHead()); - XrmPutLineResource(&new_blackboxrc, rc_string); - #endif // XINERAMA -*//* + #endif // XINERAMA #endif // SLIT - */ + */ sprintf(rc_string, "session.screen%d.rowPlacementDirection: %s", screen_number, ((screen->getRowPlacementDirection() == BScreen::LEFTRIGHT) ? "LeftToRight" : "RightToLeft"));