all repos — fluxbox @ 2d971ad48c038e730b4d90cbd6ebd75367cd07d6

custom fork of the fluxbox windowmanager

ewmh compliance updates
markt markt
commit

2d971ad48c038e730b4d90cbd6ebd75367cd07d6

parent

a72fc5e00213eccb1fcf019566eea7c98fdb0611

6 files changed, 49 insertions(+), 6 deletions(-)

jump to
M ChangeLogChangeLog

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

(Format: Year/Month/Day) Changes for 1.0rc3: +*06/07/22: + * Ewmh compliance updates: (Mark) + - implemented _NET_WM_MOVERESIZE_CANCEL (new in version 1.4.draft-1) + - move windows to last remaining workspace when a workspace is removed + - implemented _NET_REQUEST_FRAME_EXTENTS + Ewmh.cc/hh Workspace.cc/hh Screen.cc *06/07/21: * Stop using fixed values for num/caps/scroll lock, and ignore scroll lock as a modifier (Mark)
M src/Ewmh.ccsrc/Ewmh.cc

@@ -30,6 +30,7 @@ #include "Workspace.hh"

#include "Layer.hh" #include "WinClientUtil.hh" #include "fluxbox.hh" +#include "FbWinFrameTheme.hh" #include "FbTk/App.hh" #include "FbTk/FbWindow.hh"

@@ -61,7 +62,8 @@ _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT = 6,

_NET_WM_MOVERESIZE_SIZE_LEFT = 7, _NET_WM_MOVERESIZE_MOVE = 8, // movement only _NET_WM_MOVERESIZE_SIZE_KEYBOARD = 9, // size via keyboard - _NET_WM_MOVERESIZE_MOVE_KEYBOARD = 10 + _NET_WM_MOVERESIZE_MOVE_KEYBOARD = 10, // move via keyboard + _NET_WM_MOVERESIZE_CANCEL = 11 // cancel operation }; Ewmh::Ewmh() {

@@ -166,6 +168,7 @@ m_net_close_window,

m_net_moveresize_window, m_net_workarea, m_net_restack_window, + m_net_request_frame_extents, m_net_wm_moveresize,

@@ -310,6 +313,13 @@ XA_ATOM, 32, PropModeReplace,

(unsigned char*)&m_net_wm_window_type_dialog, 1); } } + + /* + * NOT YET IMPLEMENTED: + * _NET_WM_WINDOW_TYPE_TOOLBAR + * _NET_WM_WINDOW_TYPE_MENU + * _NET_WM_WINDOW_TYPE_UTILITY + */ setupState(win);

@@ -872,6 +882,24 @@ below_item.getLayer().stackBelowItem(&below_item, &above_item);

return true; + } else if (ce.message_type == m_net_request_frame_extents) { + if (!screen) + return true; + FbWinFrameTheme &theme = screen->winFrameTheme(); + int title_h = theme.titleHeight() || + theme.font().height() + 2*theme.bevelWidth() + 2; + title_h += theme.border().width(); + int handle_h = theme.handleWidth() + theme.border().width(); + int extents[4]; + // our frames currently don't protrude from left/right + extents[0] = 0; + extents[1] = 0; + extents[2] = title_h; + extents[3] = handle_h; + + XChangeProperty(FbTk::App::instance()->display(), ce.window, + m_net_frame_extents, XA_CARDINAL, 32, PropModeReplace, + (unsigned char *)extents, 4); } else if (ce.message_type == m_net_wm_moveresize) { if (winclient == 0 || winclient->fbwindow() == 0)

@@ -902,6 +930,12 @@ break;

case _NET_WM_MOVERESIZE_MOVE: case _NET_WM_MOVERESIZE_MOVE_KEYBOARD: winclient->fbwindow()->startMoving(ce.data.l[0], ce.data.l[1]); + break; + case _NET_WM_MOVERESIZE_CANCEL: + if (winclient->fbwindow()->isMoving()) + winclient->fbwindow()->stopMoving(true); + if (winclient->fbwindow()->isResizing()) + winclient->fbwindow()->stopResizing(true); break; default: cerr << "Ewmh: Unknown move/resize direction: " << ce.data.l[2] << endl;

@@ -958,6 +992,8 @@

m_net_close_window = XInternAtom(disp, "_NET_CLOSE_WINDOW", False); m_net_moveresize_window = XInternAtom(disp, "_NET_MOVERESIZE_WINDOW", False); m_net_restack_window = XInternAtom(disp, "_NET_RESTACK_WINDOW", False); + m_net_request_frame_extents = XInternAtom(disp, + "_NET_REQUEST_FRAME_EXTENTS", False); m_net_wm_moveresize = XInternAtom(disp, "_NET_WM_MOVERESIZE", False);
M src/Ewmh.hhsrc/Ewmh.hh

@@ -99,7 +99,8 @@ m_net_workarea,

m_net_supporting_wm_check, m_net_virtual_roots, m_net_moveresize_window, - m_net_restack_window; + m_net_restack_window, + m_net_request_frame_extents; // root window messages Atom m_net_close_window, m_net_wm_moveresize;
M src/Screen.ccsrc/Screen.cc

@@ -1031,7 +1031,7 @@

if (m_current_workspace->workspaceID() == wkspc->workspaceID()) changeWorkspaceID(m_current_workspace->workspaceID() - 1); - wkspc->removeAll(); + wkspc->removeAll(wkspc->workspaceID()-1); //remove last workspace m_workspaces_list.pop_back();
M src/Workspace.ccsrc/Workspace.cc

@@ -229,11 +229,11 @@ }

} -void Workspace::removeAll() { +void Workspace::removeAll(unsigned int dest) { Windows::iterator it = m_windowlist.begin(); Windows::const_iterator it_end = m_windowlist.end(); for (; it != it_end; ++it) - (*it)->iconify(); + m_screen.sendToWorkspace(dest, *it, false); }
M src/Workspace.hhsrc/Workspace.hh

@@ -58,7 +58,7 @@ /// Deiconify all windows on this workspace

void showAll(); void hideAll(bool interrupt_moving); /// Iconify all windows on this workspace - void removeAll(); + void removeAll(unsigned int dest); void reconfigure(); void shutdown();