From 82e5b1a5cce05c90a8abf715959b569e7aa14f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 20 May 2014 15:58:15 +0200 Subject: [PATCH] Drop support for _KDE_WM_CHANGE_STATE It was only used by KWindowSystem::minimizeWindow and ::unminimizeWindow and got removed from there. REVIEW: 118224 --- atoms.cpp | 1 - atoms.h | 1 - events.cpp | 19 +------------------ 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/atoms.cpp b/atoms.cpp index 10405cf6ff..92c444a007 100644 --- a/atoms.cpp +++ b/atoms.cpp @@ -39,7 +39,6 @@ Atoms::Atoms() , motif_wm_hints(QByteArrayLiteral("_MOTIF_WM_HINTS")) , net_wm_context_help(QByteArrayLiteral("_NET_WM_CONTEXT_HELP")) , net_wm_ping(QByteArrayLiteral("_NET_WM_PING")) - , kde_wm_change_state(QByteArrayLiteral("_KDE_WM_CHANGE_STATE")) , net_wm_user_time(QByteArrayLiteral("_NET_WM_USER_TIME")) , kde_net_wm_user_creation_time(QByteArrayLiteral("_KDE_NET_WM_USER_CREATION_TIME")) , kde_system_tray_embedding(QByteArrayLiteral("_KDE_SYSTEM_TRAY_EMBEDDING")) diff --git a/atoms.h b/atoms.h index 5f03fdfd29..ce2ba95e20 100644 --- a/atoms.h +++ b/atoms.h @@ -48,7 +48,6 @@ public: Xcb::Atom motif_wm_hints; Xcb::Atom net_wm_context_help; Xcb::Atom net_wm_ping; - Xcb::Atom kde_wm_change_state; Xcb::Atom net_wm_user_time; Xcb::Atom kde_net_wm_user_creation_time; Xcb::Atom kde_system_tray_embedding; diff --git a/events.cpp b/events.cpp index e964f2ab78..e7185e00db 100644 --- a/events.cpp +++ b/events.cpp @@ -763,24 +763,7 @@ void Client::clientMessageEvent(xcb_client_message_event_t *e) if (e->window != window()) return; // ignore frame/wrapper // WM_STATE - if (e->type == atoms->kde_wm_change_state) { - bool avoid_animation = (e->data.data32[ 1 ]); - if (e->data.data32[ 0 ] == XCB_ICCCM_WM_STATE_ICONIC) - minimize(); - else if (e->data.data32[ 0 ] == XCB_ICCCM_WM_STATE_NORMAL) { - // copied from mapRequest() - if (isMinimized()) - unminimize(avoid_animation); - if (isShade()) - setShade(ShadeNone); - if (!isOnCurrentDesktop()) { - if (workspace()->allowClientActivation(this)) - workspace()->activateClient(this); - else - demandAttention(); - } - } - } else if (e->type == atoms->wm_change_state) { + if (e->type == atoms->wm_change_state) { if (e->data.data32[0] == XCB_ICCCM_WM_STATE_ICONIC) minimize(); return;