all repos — fluxbox @ c5fd69cc9de2ed08176d655c1e46e9305c5543df

custom fork of the fluxbox windowmanager

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
commit

c5fd69cc9de2ed08176d655c1e46e9305c5543df

parent

ed7bcc5dbcbd2d3e4dddb4c57219ef6beda240e6

2 files changed, 13 insertions(+), 5 deletions(-)

jump to
M src/Screen.ccsrc/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.ccsrc/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