all repos — fluxbox @ 79aec8465f8a1e618034ac08fa2d55fcca09eb5a

custom fork of the fluxbox windowmanager

Fixed gnome init problems (Simon)
rathnor rathnor
commit

79aec8465f8a1e618034ac08fa2d55fcca09eb5a

parent

9a82a5b1dc3cacafbdda7b54fb9ebf71ef526be3

5 files changed, 34 insertions(+), 18 deletions(-)

jump to
M ChangeLogChangeLog

@@ -3,6 +3,8 @@ Changes for 0.1.15:

*03/02/16: * Added layer submenu to window menu + small fix (Simon) Screen.cc Window.hh/cc fluxbox.hh + * Fixed gnome workspace initialisation issues (Simon) + Gnome.cc Window.hh/cc Screen.cc *03/02/15: * Added Style menu and fixed theme listeners for FbWinFrame, Menu and Toolbar (Henrik) ToolbarTheme.hh/cc, Toolbar.hh/cc, FbTk Menu.hh/cc, FbTk MenuTheme.hh/cc,
M src/Gnome.ccsrc/Gnome.cc

@@ -19,7 +19,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: Gnome.cc,v 1.9 2003/02/09 14:11:12 rathnor Exp $ +// $Id: Gnome.cc,v 1.10 2003/02/16 17:57:54 rathnor Exp $ #include "Gnome.hh"

@@ -107,13 +107,14 @@ setLayer(&win, flags);

XFree (data); } - // load gnome layer atom + // load gnome workspace atom if (XGetWindowProperty(disp, win.getClientWindow(), m_gnome_wm_win_workspace, 0, 1, False, XA_CARDINAL, &ret_type, &fmt, &nitems, &bytes_after, (unsigned char **) &data) == Success && data) { - flags = *data; - win.getScreen()->reassociateWindow(&win, flags ,false); + unsigned int workspace_num = *data; + if (win.getWorkspaceNumber() != workspace_num) + win.getScreen()->reassociateWindow(&win, workspace_num, false); XFree (data); }
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.108 2003/02/16 16:45:23 fluxgen Exp $ +// $Id: Screen.cc,v 1.109 2003/02/16 17:57:54 rathnor Exp $ #include "Screen.hh"

@@ -1105,7 +1105,11 @@ } else {

Fluxbox::instance()->saveWindowSearch(client, win); Fluxbox::instance()->attachSignals(*win); setupWindowActions(*win); - } + } + if (win->getWorkspaceNumber() == getCurrentWorkspaceID() || win->isStuck()) { + win->show(); + XSync(FbTk::App::instance()->display(), False); + } return win; }

@@ -1127,8 +1131,8 @@ CommandRef maximize_horiz_cmd(new WindowCmd(win, &FluxboxWindow::maximizeHorizontal));

CommandRef close_cmd(new WindowCmd(win, &FluxboxWindow::close)); CommandRef shade_cmd(new WindowCmd(win, &FluxboxWindow::shade)); CommandRef raise_cmd(new WindowCmd(win, &FluxboxWindow::raise)); + CommandRef lower_cmd(new WindowCmd(win, &FluxboxWindow::lower)); CommandRef raise_and_focus_cmd(new WindowCmd(win, &FluxboxWindow::raiseAndFocus)); - CommandRef lower_cmd(new WindowCmd(win, &FluxboxWindow::raise)); CommandRef stick_cmd(new WindowCmd(win, &FluxboxWindow::stick)); CommandRef show_menu_cmd(new WindowCmd(win, &FluxboxWindow::popupMenu));

@@ -1138,7 +1142,6 @@ //!! TODO: fix this ugly hack

// get titlebar configuration const vector<Fluxbox::Titlebar> *dir = &Fluxbox::instance()->getTitlebarLeft(); for (char c=0; c<2; c++) { - for (size_t i=0; i< dir->size(); ++i) { //create new buttons FbTk::Button *newbutton = 0;

@@ -1324,7 +1327,6 @@ reassociateWindow(w, wkspc_id, ignore_sticky);

} } - void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { if (! w) return;

@@ -1337,6 +1339,7 @@ }

if (w->getWorkspaceNumber() == wkspc_id) return; + if (w->isIconic()) { removeIcon(w);
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.116 2003/02/16 15:12:07 rathnor Exp $ +// $Id: Window.cc,v 1.117 2003/02/16 17:57:53 rathnor Exp $ #include "Window.hh"

@@ -261,7 +261,7 @@

if (workspace_number < 0 || workspace_number >= screen->getCount()) workspace_number = screen->getCurrentWorkspaceID(); - restoreAttributes(place_window); + restoreAttributes(); moveToLayer(m_layernum); screen->getWorkspace(workspace_number)->addWindow(this, place_window);

@@ -289,10 +289,6 @@

// no focus default setFocusFlag(false); - // finaly show the frame and the client window - - m_frame.show(); - XSync(display, False); }

@@ -931,6 +927,15 @@ decorations.tab = flag;

*/ } +void FluxboxWindow::hide() { + m_windowmenu.hide(); + m_frame.hide(); +} + +void FluxboxWindow::show() { + m_frame.show(); +} + /** Unmaps the window and removes it from workspace list */

@@ -1103,6 +1108,7 @@ }

void FluxboxWindow::setWorkspace(int n) { + workspace_number = n; blackbox_attrib.flags |= BaseDisplay::ATTRIB_WORKSPACE;

@@ -1501,7 +1507,7 @@ * restoreAttributes sets the attributes to what they should be

* but doesn't change the actual state * (so the caller can set defaults etc as well) */ -void FluxboxWindow::restoreAttributes(bool place_window) { +void FluxboxWindow::restoreAttributes() { if (!getState()) current_state = NormalState;
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.47 2003/02/16 16:43:00 fluxgen Exp $ +// $Id: Window.hh,v 1.48 2003/02/16 17:57:53 rathnor Exp $ #ifndef WINDOW_HH #define WINDOW_HH

@@ -111,6 +111,10 @@ bool setInputFocus();

void raiseAndFocus() { raise(); setInputFocus(); } void setTab(bool flag); void setFocusFlag(bool flag); + // map this window + void show(); + // unmap this window + void hide(); void iconify(); void deiconify(bool = true, bool = true); /// destroy this window

@@ -145,7 +149,7 @@ void moveResize(int x, int y, unsigned int width, unsigned int height);

void setWorkspace(int n); void changeBlackboxHints(const BaseDisplay::BlackboxHints &bh); - void restoreAttributes(bool place_window); + void restoreAttributes(); void showMenu(int mx, int my); // popup menu on last button press position void popupMenu();