all repos — fluxbox @ 9b7775751decd095f091d122c1ce057c6a04b64d

custom fork of the fluxbox windowmanager

support _NET_WM_WINDOW_TYPE_DESKTOP (e.g. nautilus desktop windows)
Allow FluxboxWindows to be untabable.
rathnor rathnor
commit

9b7775751decd095f091d122c1ce057c6a04b64d

parent

4589ecdbbc719cc49f10cef4a9460d89b6a8fba7

5 files changed, 41 insertions(+), 10 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,9 @@

(Format: Year/Month/Day) Changes for 0.9.10: *04/06/20: + * Support _NET_WM_WINDOW_TYPE_DESKTOP (Simon) + - eg nautilus desktop windows are on the bottom, not tabable, etc + Ewmh.hh/cc Window.hh/cc * Fix honouring of initial state on window open (Simon) Window.hh/cc Screen.cc *04/06/18:
M src/Ewmh.ccsrc/Ewmh.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: Ewmh.cc,v 1.46 2004/06/07 11:46:04 rathnor Exp $ +// $Id: Ewmh.cc,v 1.47 2004/06/20 04:49:32 rathnor Exp $ #include "Ewmh.hh"

@@ -86,6 +86,7 @@

// window type m_net_wm_window_type, m_net_wm_window_type_dock, + m_net_wm_window_type_desktop, // root properties m_net_client_list,

@@ -178,6 +179,22 @@ // we also assume it shouldn't be visible in any toolbar

win.setFocusHidden(true); win.setIconHidden(true); break; + } else if (atoms[l] == m_net_wm_window_type_desktop) { + /* + * _NET_WM_WINDOW_TYPE_DOCK indicates a "false desktop" window + * We let it be the size it wants, but it gets no decoration, + * is hidden in the toolbar and window cycling list, plus + * windows don't tab with it and is right on the bottom. + */ + + win.setFocusHidden(true); + win.setIconHidden(true); + win.moveToLayer(Fluxbox::instance()->getDesktopLayer()); + win.setDecorationMask(0); + win.setTabable(false); + win.setMovable(false); + win.setResizable(false); + win.stick(); } }

@@ -657,6 +674,7 @@

// type atoms m_net_wm_window_type = XInternAtom(disp, "_NET_WM_WINDOW_TYPE", False); m_net_wm_window_type_dock = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DOCK", False); + m_net_wm_window_type_desktop = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DESKTOP", False); // state atom and the supported state atoms m_net_wm_state = XInternAtom(disp, "_NET_WM_STATE", False);
M src/Ewmh.hhsrc/Ewmh.hh

@@ -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: Ewmh.hh,v 1.17 2004/01/21 15:42:35 fluxgen Exp $ +// $Id: Ewmh.hh,v 1.18 2004/06/20 04:49:32 rathnor Exp $ #include "AtomHandler.hh"

@@ -92,6 +92,7 @@ Atom m_net_properties, m_net_wm_name, m_net_wm_desktop,

// types m_net_wm_window_type, m_net_wm_window_type_dock, + m_net_wm_window_type_desktop, // states m_net_wm_state, m_net_wm_state_sticky, m_net_wm_state_shaded,
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.290 2004/06/19 15:04:27 rathnor Exp $ +// $Id: Window.cc,v 1.291 2004/06/20 04:49:32 rathnor Exp $ #include "Window.hh"

@@ -432,7 +432,7 @@ decorations.maximize = decorations.close =

decorations.sticky = decorations.shade = decorations.tab = true; - functions.resize = functions.move = functions.iconify = functions.maximize = true; + functions.resize = functions.move = functions.iconify = functions.maximize = functions.tabable = true; decorations.close = false; if (m_client->getBlackboxHint() != 0)

@@ -1049,7 +1049,9 @@ if (hint->decorations & MwmDecorMaximize)

decorations.maximize = true; } } - + + // functions.tabable is ours, not special one + // note that it means this window is "tabbable" if (hint->flags & MwmHintsFunctions) { if (hint->functions & MwmFuncAll) { functions.resize = functions.move = functions.iconify =

@@ -2532,7 +2534,8 @@ m_last_resize_h - 1 + 2 * frame().window().borderWidth());

screen().showGeometry(gx, gy); } - } else if ((me.state & Button2Mask) && inside_titlebar && (client != 0 || m_attaching_tab != 0)) { + } else if (functions.tabable && + (me.state & Button2Mask) && inside_titlebar && (client != 0 || m_attaching_tab != 0)) { // // drag'n'drop code for tabs //

@@ -3084,7 +3087,7 @@ attach_to_win = client->fbwindow();

} } if (attach_to_win != this && - attach_to_win != 0) { + attach_to_win != 0 && attach_to_win->isTabable()) { attach_to_win->attachClient(*m_attaching_tab);
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.115 2004/06/19 15:04:28 rathnor Exp $ +// $Id: Window.hh,v 1.116 2004/06/20 04:49:33 rathnor Exp $ #ifndef WINDOW_HH #define WINDOW_HH

@@ -258,7 +258,6 @@ void setDecoration(Decoration decoration, bool apply = true);

void applyDecorations(bool initial = false); void toggleDecoration(); - unsigned int decorationMask() const; void setDecorationMask(unsigned int mask);

@@ -266,6 +265,13 @@ /**

@name accessors */ //@{ + // whether this window can be tabbed with other windows, + // and others tabbed with it + inline void setTabable(bool tabable) { functions.tabable = tabable; } + inline bool isTabable() { return functions.tabable; } + inline void setMovable(bool movable) { functions.move = movable; } + inline void setResizable(bool resizable) { functions.resize = resizable; } + inline bool isFocusHidden() const { return (m_blackbox_attrib.flags & ATTRIB_HIDDEN); } inline bool isIconHidden() const { return m_icon_hidden; } inline bool isManaged() const { return m_managed; }

@@ -482,7 +488,7 @@

bool m_toggled_decos; struct _functions { - bool resize, move, iconify, maximize, close; + bool resize, move, iconify, maximize, close, tabable; } functions; bool m_shaped; ///< if the window is shaped with a mask