treat windows having WM_CLASS == "DockApp" like DockApps this commit implements feature-request #317: "Add support for GTK dockapps.": "Back in 2010, WindowMaker implemented a system where windows with WM_CLASS res_class = DockApp would be treated as if they had initial_state = WithdrawnState, since GTK refuses to allow this."
Mathias Gumz akira at fluxbox dot org
2 files changed,
13 insertions(+),
5 deletions(-)
M
src/Screen.cc
→
src/Screen.cc
@@ -1236,14 +1236,14 @@
FluxboxWindow *BScreen::createWindow(Window client) { FbTk::App::instance()->sync(false); - if (isKdeDockapp(client) && addKdeDockapp(client)) { return 0; // dont create a FluxboxWindow for this one } WinClient *winclient = new WinClient(client, *this); - if (winclient->initial_state == WithdrawnState) { + if (winclient->initial_state == WithdrawnState || + winclient->getWMClassClass() == "DockApp") { delete winclient; #ifdef USE_SLIT if (slit() && !isKdeDockapp(client))@@ -1306,8 +1306,13 @@
FluxboxWindow *win = new FluxboxWindow(client); #ifdef SLIT - if (win->initialState() == WithdrawnState && slit() != 0) { - slit()->addClient(client.window()); + if (slit() != 0) { + + if (win->initialState() == WithdrawnState) { + slit()->addClient(client.window()); + } else if (client->getWMClassClass() == "DockApp") { + slit()->addClient(client.window()); + } } #endif // SLIT
M
src/Window.cc
→
src/Window.cc
@@ -389,8 +389,10 @@ XWindowAttributes wattrib;
if (! m_client->getAttrib(wattrib) || !wattrib.screen || // no screen? ?? wattrib.override_redirect || // override redirect - m_client->initial_state == WithdrawnState) // Slit client + m_client->initial_state == WithdrawnState || + m_client->getWMClassClass() == "DockApp") { // Slit client return; + } if (m_client->initial_state == IconicState) m_state.iconic = true;@@ -399,6 +401,7 @@ m_client->setFluxboxWindow(this);
m_client->setGroupLeftWindow(None); // nothing to the left. if (Fluxbox::instance()->haveShape()) + Shape::setShapeNotify(winClient()); //!! TODO init of client should be better