diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-06-21 12:20:36 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-23 02:22:27 +0100 |
commit | f2208fe7d1d51c4bbbd73f74d075a538b6b189f5 (patch) | |
tree | 7b54e10801f96799d7143319ea0e597c35525f59 | |
parent | 3c86967a318c01499b4129a6620f33f5118fb204 (diff) | |
download | tdelibs-f2208fe7d1d51c4bbbd73f74d075a538b6b189f5.tar.gz tdelibs-f2208fe7d1d51c4bbbd73f74d075a538b6b189f5.zip |
Fix Kate not coming to foreground with focus in MDI mode
This resolves Bug 692
(cherry picked from commit 93993ebd03bd0d322f9aacf64952ed06b6040135)
-rw-r--r-- | kdeui/kmainwindowiface.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/kdeui/kmainwindowiface.cpp b/kdeui/kmainwindowiface.cpp index da4d468a6..2030bd4d6 100644 --- a/kdeui/kmainwindowiface.cpp +++ b/kdeui/kmainwindowiface.cpp @@ -27,29 +27,7 @@ #include <kaction.h> #include <tqclipboard.h> -#include <X11/Xlib.h> -#include <X11/Xatom.h> - -// INTERNAL -// Originally from http://permalink.gmane.org/gmane.comp.lib.qt.general/4733 -void wmMessage(KMainWindow * mainWindow, long type, long l0, long l1, long l2, long l3, long l4) -{ - XClientMessageEvent xev; - - xev.type = ClientMessage; - xev.window = mainWindow->winId(); - xev.message_type = type; - xev.format = 32; - xev.data.l[0] = l0; - xev.data.l[1] = l1; - xev.data.l[2] = l2; - xev.data.l[3] = l3; - xev.data.l[4] = l4; - - XSendEvent(mainWindow->x11Display(), mainWindow->winId(), False, - (SubstructureNotifyMask | SubstructureRedirectMask), - (XEvent *)&xev); -} +#include <kwin.h> KMainWindowInterface::KMainWindowInterface(KMainWindow * mainWindow) : DCOPObject( mainWindow->name()) @@ -216,8 +194,7 @@ void KMainWindowInterface::setActiveWindowFocused() m_MainWindow->setActiveWindow(); // activate window (try to work around focus-stealing prevention) - static Atom NET_ACTIVE_WINDOW = XInternAtom(m_MainWindow->x11Display(), "_NET_ACTIVE_WINDOW", False); - wmMessage(m_MainWindow, NET_ACTIVE_WINDOW, 2, CurrentTime, 0, 0, 0); + KWin::forceActiveWindow(m_MainWindow->winId()); } QCStringList KMainWindowInterface::functionsDynamic() { |