diff options
author | Timothy Pearson <[email protected]> | 2013-06-21 12:20:36 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-06-21 12:20:36 -0500 |
commit | 93993ebd03bd0d322f9aacf64952ed06b6040135 (patch) | |
tree | 306a2bb03b51d620851abb367d77bcd16886a975 /tdeui/tdemainwindowiface.cpp | |
parent | 6f1973a708396873d12b51b32667bd0b9a530263 (diff) | |
download | tdelibs-93993ebd03bd0d322f9aacf64952ed06b6040135.tar.gz tdelibs-93993ebd03bd0d322f9aacf64952ed06b6040135.zip |
Fix Kate not coming to foreground with focus in MDI mode
This resolves Bug 692
Diffstat (limited to 'tdeui/tdemainwindowiface.cpp')
-rw-r--r-- | tdeui/tdemainwindowiface.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/tdeui/tdemainwindowiface.cpp b/tdeui/tdemainwindowiface.cpp index 7161ec86f..0404249b0 100644 --- a/tdeui/tdemainwindowiface.cpp +++ b/tdeui/tdemainwindowiface.cpp @@ -27,29 +27,7 @@ #include <tdeaction.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(TDEMainWindow * 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 <twin.h> TDEMainWindowInterface::TDEMainWindowInterface(TDEMainWindow * mainWindow) : DCOPObject( mainWindow->name()) @@ -216,8 +194,7 @@ void TDEMainWindowInterface::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 TDEMainWindowInterface::functionsDynamic() { |