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."
This commit is contained in:
parent
ed7bcc5dbc
commit
c5fd69cc9d
2 changed files with 13 additions and 5 deletions
|
@ -1236,14 +1236,14 @@ bool BScreen::addKdeDockapp(Window client) {
|
|||
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 *BScreen::createWindow(WinClient &client) {
|
|||
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
|
||||
|
||||
|
|
|
@ -389,8 +389,10 @@ void FluxboxWindow::init() {
|
|||
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 @@ void FluxboxWindow::init() {
|
|||
m_client->setGroupLeftWindow(None); // nothing to the left.
|
||||
|
||||
if (Fluxbox::instance()->haveShape())
|
||||
|
||||
Shape::setShapeNotify(winClient());
|
||||
|
||||
//!! TODO init of client should be better
|
||||
|
|
Loading…
Reference in a new issue