From ece17362370e5b9ef5e6e9677e896c8609587106 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 19 Jan 2004 18:21:51 +0000 Subject: support for _NET_WM_CLIENT_LIST_STACKING, _NET_WM_DESKTOP_VIEWPORT, _NET_WM_DESKTOP_GEOMETRY, _NET_WORKAREA, _NET_ACTIVE_WINDOW --- src/Ewmh.cc | 210 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- src/Ewmh.hh | 10 ++- 2 files changed, 205 insertions(+), 15 deletions(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 7b761d1..67a3520 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Ewmh.cc,v 1.37 2004/01/18 19:12:11 fluxgen Exp $ +// $Id: Ewmh.cc,v 1.38 2004/01/19 18:21:51 fluxgen Exp $ #include "Ewmh.hh" @@ -29,6 +29,8 @@ #include "Workspace.hh" #include "fluxbox.hh" +#include "FbTk/FbWindow.hh" + #include #include #include @@ -36,7 +38,6 @@ using namespace std; Ewmh::Ewmh() { createAtoms(); - enableUpdate(); } Ewmh::~Ewmh() { @@ -81,30 +82,56 @@ void Ewmh::initForScreen(BScreen &screen) { m_net_wm_state_hidden, m_net_wm_state_skip_taskbar, - m_net_wm_desktop, - // root properties m_net_client_list, + m_net_client_list_stacking, m_net_number_of_desktops, m_net_current_desktop, m_net_active_window, m_net_close_window, m_net_moveresize_window, + m_net_workarea, + + // desktop properties + m_net_wm_desktop, m_net_desktop_names, + m_net_desktop_viewport, + m_net_desktop_geometry, + m_net_supporting_wm_check }; - + /* From Extended Window Manager Hints, draft 1.3: + * + * _NET_SUPPORTED, ATOM[]/32 + * + * This property MUST be set by the Window Manager + * to indicate which hints it supports. For + * example: considering _NET_WM_STATE both this + * atom and all supported states + * e.g. _NET_WM_STATE_MODAL, _NET_WM_STATE_STICKY, + * would be listed. This assumes that backwards + * incompatible changes will not be made to the + * hints (without being renamed). + */ screen.rootWindow().changeProperty(m_net_supported, XA_ATOM, 32, PropModeReplace, (unsigned char *) &atomsupported, (sizeof atomsupported)/sizeof atomsupported[0]); - + // update atoms + + updateWorkspaceCount(screen); + updateCurrentWorkspace(screen); + updateWorkspaceNames(screen); + updateClientList(screen); + updateViewPort(screen); + updateGeometry(screen); + updateWorkarea(screen); + } void Ewmh::setupClient(WinClient &winclient) { updateStrut(winclient); - } void Ewmh::setupFrame(FluxboxWindow &win) { @@ -119,7 +146,7 @@ void Ewmh::setupFrame(FluxboxWindow &win) { if (data) { // we must convert to long unsigned long *real = (unsigned long *)data; - for (int i=0; ifocus(); + if (winclient->fbwindow()) + winclient->fbwindow()->raise(); + return true; } else if (ce.message_type == m_net_close_window) { if (winclient == 0) diff --git a/src/Ewmh.hh b/src/Ewmh.hh index 6de9073..a2340c9 100644 --- a/src/Ewmh.hh +++ b/src/Ewmh.hh @@ -1,5 +1,5 @@ // Ewmh.hh for fluxbox -// Copyright (c) 2002 Henrik Kinnunen (fluxgen@fluxbox.org) +// Copyright (c) 2002 - 2004 Henrik Kinnunen (fluxgenfluxbox.org) // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -13,13 +13,13 @@ // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // 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.13 2004/01/18 19:12:11 fluxgen Exp $ +// $Id: Ewmh.hh,v 1.14 2004/01/19 18:21:51 fluxgen Exp $ #include "AtomHandler.hh" @@ -36,10 +36,14 @@ public: void setupFrame(FluxboxWindow &win); void setupClient(WinClient &winclient); + void updateFocusedWindow(BScreen &screen, Window win); void updateClientList(BScreen &screen); void updateWorkspaceNames(BScreen &screen); void updateCurrentWorkspace(BScreen &screen); void updateWorkspaceCount(BScreen &screen); + void updateViewPort(BScreen &screen); + void updateGeometry(BScreen &screen); + void updateWorkarea(BScreen &screen); void updateState(FluxboxWindow &win); void updateLayer(FluxboxWindow &win); -- cgit v0.11.2