summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/Ewmh.cc20
-rw-r--r--src/Ewmh.hh3
-rw-r--r--src/Window.cc13
-rw-r--r--src/Window.hh12
5 files changed, 41 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 1848902..6601db6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.10: 2Changes for 0.9.10:
3*04/06/20: 3*04/06/20:
4 * Support _NET_WM_WINDOW_TYPE_DESKTOP (Simon)
5 - eg nautilus desktop windows are on the bottom, not tabable, etc
6 Ewmh.hh/cc Window.hh/cc
4 * Fix honouring of initial state on window open (Simon) 7 * Fix honouring of initial state on window open (Simon)
5 Window.hh/cc Screen.cc 8 Window.hh/cc Screen.cc
6*04/06/18: 9*04/06/18:
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index ff09588..ad6663f 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Ewmh.cc,v 1.46 2004/06/07 11:46:04 rathnor Exp $ 22// $Id: Ewmh.cc,v 1.47 2004/06/20 04:49:32 rathnor Exp $
23 23
24#include "Ewmh.hh" 24#include "Ewmh.hh"
25 25
@@ -86,6 +86,7 @@ void Ewmh::initForScreen(BScreen &screen) {
86 // window type 86 // window type
87 m_net_wm_window_type, 87 m_net_wm_window_type,
88 m_net_wm_window_type_dock, 88 m_net_wm_window_type_dock,
89 m_net_wm_window_type_desktop,
89 90
90 // root properties 91 // root properties
91 m_net_client_list, 92 m_net_client_list,
@@ -178,6 +179,22 @@ void Ewmh::setupFrame(FluxboxWindow &win) {
178 win.setFocusHidden(true); 179 win.setFocusHidden(true);
179 win.setIconHidden(true); 180 win.setIconHidden(true);
180 break; 181 break;
182 } else if (atoms[l] == m_net_wm_window_type_desktop) {
183 /*
184 * _NET_WM_WINDOW_TYPE_DOCK indicates a "false desktop" window
185 * We let it be the size it wants, but it gets no decoration,
186 * is hidden in the toolbar and window cycling list, plus
187 * windows don't tab with it and is right on the bottom.
188 */
189
190 win.setFocusHidden(true);
191 win.setIconHidden(true);
192 win.moveToLayer(Fluxbox::instance()->getDesktopLayer());
193 win.setDecorationMask(0);
194 win.setTabable(false);
195 win.setMovable(false);
196 win.setResizable(false);
197 win.stick();
181 } 198 }
182 199
183 } 200 }
@@ -657,6 +674,7 @@ void Ewmh::createAtoms() {
657 // type atoms 674 // type atoms
658 m_net_wm_window_type = XInternAtom(disp, "_NET_WM_WINDOW_TYPE", False); 675 m_net_wm_window_type = XInternAtom(disp, "_NET_WM_WINDOW_TYPE", False);
659 m_net_wm_window_type_dock = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DOCK", False); 676 m_net_wm_window_type_dock = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DOCK", False);
677 m_net_wm_window_type_desktop = XInternAtom(disp, "_NET_WM_WINDOW_TYPE_DESKTOP", False);
660 678
661 // state atom and the supported state atoms 679 // state atom and the supported state atoms
662 m_net_wm_state = XInternAtom(disp, "_NET_WM_STATE", False); 680 m_net_wm_state = XInternAtom(disp, "_NET_WM_STATE", False);
diff --git a/src/Ewmh.hh b/src/Ewmh.hh
index d89f15b..d4bd09c 100644
--- a/src/Ewmh.hh
+++ b/src/Ewmh.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Ewmh.hh,v 1.17 2004/01/21 15:42:35 fluxgen Exp $ 22// $Id: Ewmh.hh,v 1.18 2004/06/20 04:49:32 rathnor Exp $
23 23
24#include "AtomHandler.hh" 24#include "AtomHandler.hh"
25 25
@@ -92,6 +92,7 @@ private:
92 // types 92 // types
93 m_net_wm_window_type, 93 m_net_wm_window_type,
94 m_net_wm_window_type_dock, 94 m_net_wm_window_type_dock,
95 m_net_wm_window_type_desktop,
95 96
96 // states 97 // states
97 m_net_wm_state, m_net_wm_state_sticky, m_net_wm_state_shaded, 98 m_net_wm_state, m_net_wm_state_sticky, m_net_wm_state_shaded,
diff --git a/src/Window.cc b/src/Window.cc
index 553c863..b36ade7 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.290 2004/06/19 15:04:27 rathnor Exp $ 25// $Id: Window.cc,v 1.291 2004/06/20 04:49:32 rathnor Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -432,7 +432,7 @@ void FluxboxWindow::init() {
432 decorations.sticky = decorations.shade = decorations.tab = true; 432 decorations.sticky = decorations.shade = decorations.tab = true;
433 433
434 434
435 functions.resize = functions.move = functions.iconify = functions.maximize = true; 435 functions.resize = functions.move = functions.iconify = functions.maximize = functions.tabable = true;
436 decorations.close = false; 436 decorations.close = false;
437 437
438 if (m_client->getBlackboxHint() != 0) 438 if (m_client->getBlackboxHint() != 0)
@@ -1049,7 +1049,9 @@ void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) {
1049 decorations.maximize = true; 1049 decorations.maximize = true;
1050 } 1050 }
1051 } 1051 }
1052 1052
1053 // functions.tabable is ours, not special one
1054 // note that it means this window is "tabbable"
1053 if (hint->flags & MwmHintsFunctions) { 1055 if (hint->flags & MwmHintsFunctions) {
1054 if (hint->functions & MwmFuncAll) { 1056 if (hint->functions & MwmFuncAll) {
1055 functions.resize = functions.move = functions.iconify = 1057 functions.resize = functions.move = functions.iconify =
@@ -2532,7 +2534,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2532 2534
2533 screen().showGeometry(gx, gy); 2535 screen().showGeometry(gx, gy);
2534 } 2536 }
2535 } else if ((me.state & Button2Mask) && inside_titlebar && (client != 0 || m_attaching_tab != 0)) { 2537 } else if (functions.tabable &&
2538 (me.state & Button2Mask) && inside_titlebar && (client != 0 || m_attaching_tab != 0)) {
2536 // 2539 //
2537 // drag'n'drop code for tabs 2540 // drag'n'drop code for tabs
2538 // 2541 //
@@ -3084,7 +3087,7 @@ void FluxboxWindow::attachTo(int x, int y, bool interrupted) {
3084 } 3087 }
3085 } 3088 }
3086 if (attach_to_win != this && 3089 if (attach_to_win != this &&
3087 attach_to_win != 0) { 3090 attach_to_win != 0 && attach_to_win->isTabable()) {
3088 3091
3089 attach_to_win->attachClient(*m_attaching_tab); 3092 attach_to_win->attachClient(*m_attaching_tab);
3090 3093
diff --git a/src/Window.hh b/src/Window.hh
index 44c1f4d..f12384e 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.115 2004/06/19 15:04:28 rathnor Exp $ 25// $Id: Window.hh,v 1.116 2004/06/20 04:49:33 rathnor Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -258,7 +258,6 @@ public:
258 void applyDecorations(bool initial = false); 258 void applyDecorations(bool initial = false);
259 void toggleDecoration(); 259 void toggleDecoration();
260 260
261
262 unsigned int decorationMask() const; 261 unsigned int decorationMask() const;
263 void setDecorationMask(unsigned int mask); 262 void setDecorationMask(unsigned int mask);
264 263
@@ -266,6 +265,13 @@ public:
266 @name accessors 265 @name accessors
267 */ 266 */
268 //@{ 267 //@{
268 // whether this window can be tabbed with other windows,
269 // and others tabbed with it
270 inline void setTabable(bool tabable) { functions.tabable = tabable; }
271 inline bool isTabable() { return functions.tabable; }
272 inline void setMovable(bool movable) { functions.move = movable; }
273 inline void setResizable(bool resizable) { functions.resize = resizable; }
274
269 inline bool isFocusHidden() const { return (m_blackbox_attrib.flags & ATTRIB_HIDDEN); } 275 inline bool isFocusHidden() const { return (m_blackbox_attrib.flags & ATTRIB_HIDDEN); }
270 inline bool isIconHidden() const { return m_icon_hidden; } 276 inline bool isIconHidden() const { return m_icon_hidden; }
271 inline bool isManaged() const { return m_managed; } 277 inline bool isManaged() const { return m_managed; }
@@ -482,7 +488,7 @@ private:
482 bool m_toggled_decos; 488 bool m_toggled_decos;
483 489
484 struct _functions { 490 struct _functions {
485 bool resize, move, iconify, maximize, close; 491 bool resize, move, iconify, maximize, close, tabable;
486 } functions; 492 } functions;
487 493
488 bool m_shaped; ///< if the window is shaped with a mask 494 bool m_shaped; ///< if the window is shaped with a mask