aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2014-09-29 07:24:42 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2014-09-29 07:26:52 (GMT)
commitc5fd69cc9de2ed08176d655c1e46e9305c5543df (patch)
tree38625686b10509f575782ddce3a70667ef3cf924
parented7bcc5dbcbd2d3e4dddb4c57219ef6beda240e6 (diff)
downloadfluxbox-c5fd69cc9de2ed08176d655c1e46e9305c5543df.zip
fluxbox-c5fd69cc9de2ed08176d655c1e46e9305c5543df.tar.bz2
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."
-rw-r--r--src/Screen.cc13
-rw-r--r--src/Window.cc5
2 files changed, 13 insertions, 5 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index f1cee02..29ab548 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1236,14 +1236,14 @@ bool BScreen::addKdeDockapp(Window client) {
1236FluxboxWindow *BScreen::createWindow(Window client) { 1236FluxboxWindow *BScreen::createWindow(Window client) {
1237 FbTk::App::instance()->sync(false); 1237 FbTk::App::instance()->sync(false);
1238 1238
1239
1240 if (isKdeDockapp(client) && addKdeDockapp(client)) { 1239 if (isKdeDockapp(client) && addKdeDockapp(client)) {
1241 return 0; // dont create a FluxboxWindow for this one 1240 return 0; // dont create a FluxboxWindow for this one
1242 } 1241 }
1243 1242
1244 WinClient *winclient = new WinClient(client, *this); 1243 WinClient *winclient = new WinClient(client, *this);
1245 1244
1246 if (winclient->initial_state == WithdrawnState) { 1245 if (winclient->initial_state == WithdrawnState ||
1246 winclient->getWMClassClass() == "DockApp") {
1247 delete winclient; 1247 delete winclient;
1248#ifdef USE_SLIT 1248#ifdef USE_SLIT
1249 if (slit() && !isKdeDockapp(client)) 1249 if (slit() && !isKdeDockapp(client))
@@ -1306,8 +1306,13 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) {
1306 FluxboxWindow *win = new FluxboxWindow(client); 1306 FluxboxWindow *win = new FluxboxWindow(client);
1307 1307
1308#ifdef SLIT 1308#ifdef SLIT
1309 if (win->initialState() == WithdrawnState && slit() != 0) { 1309 if (slit() != 0) {
1310 slit()->addClient(client.window()); 1310
1311 if (win->initialState() == WithdrawnState) {
1312 slit()->addClient(client.window());
1313 } else if (client->getWMClassClass() == "DockApp") {
1314 slit()->addClient(client.window());
1315 }
1311 } 1316 }
1312#endif // SLIT 1317#endif // SLIT
1313 1318
diff --git a/src/Window.cc b/src/Window.cc
index b44fd1d..2b997a7 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -389,8 +389,10 @@ void FluxboxWindow::init() {
389 if (! m_client->getAttrib(wattrib) || 389 if (! m_client->getAttrib(wattrib) ||
390 !wattrib.screen || // no screen? ?? 390 !wattrib.screen || // no screen? ??
391 wattrib.override_redirect || // override redirect 391 wattrib.override_redirect || // override redirect
392 m_client->initial_state == WithdrawnState) // Slit client 392 m_client->initial_state == WithdrawnState ||
393 m_client->getWMClassClass() == "DockApp") { // Slit client
393 return; 394 return;
395 }
394 396
395 if (m_client->initial_state == IconicState) 397 if (m_client->initial_state == IconicState)
396 m_state.iconic = true; 398 m_state.iconic = true;
@@ -399,6 +401,7 @@ void FluxboxWindow::init() {
399 m_client->setGroupLeftWindow(None); // nothing to the left. 401 m_client->setGroupLeftWindow(None); // nothing to the left.
400 402
401 if (Fluxbox::instance()->haveShape()) 403 if (Fluxbox::instance()->haveShape())
404
402 Shape::setShapeNotify(winClient()); 405 Shape::setShapeNotify(winClient());
403 406
404 //!! TODO init of client should be better 407 //!! TODO init of client should be better