diff options
| -rw-r--r-- | src/kvirc/ui/kvi_frame.cpp | 23 | ||||
| -rw-r--r-- | src/kvirc/ui/kvi_frame.h | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/kvirc/ui/kvi_frame.cpp b/src/kvirc/ui/kvi_frame.cpp index cb9f40e44..233c758fb 100644 --- a/src/kvirc/ui/kvi_frame.cpp +++ b/src/kvirc/ui/kvi_frame.cpp @@ -788,6 +788,29 @@ void KviFrame::childWindowActivated(KviWindow *wnd, bool bForce) KVS_TRIGGER_EVENT_0(KviEvent_OnWindowActivated,wnd); } +void KviFrame::changeEvent(QEvent * e) +{ + if (e->type() == QEvent::ActivationChange) + { + //WINDOW (DE)ACTIVATION + // if we have just been activated by the WM + // then update the active window task bar item + // It will then reset its highlight state + // and hopefully make the dock widget work correctly + // in this case. + // This will also trigger the OnWindowActivated event :) + if(isActiveWindow()) + { + if(g_pActiveWindow) + childWindowActivated(g_pActiveWindow, true); + } else { + if(g_pActiveWindow) + g_pActiveWindow->lostUserFocus(); + } + } + KviTalMainWindow::changeEvent(e); +} + void KviFrame::closeEvent(QCloseEvent *e) { //check if the user just want us to minimize in tray; if we're not the sender diff --git a/src/kvirc/ui/kvi_frame.h b/src/kvirc/ui/kvi_frame.h index 508abd2ae..b415fbfa3 100644 --- a/src/kvirc/ui/kvi_frame.h +++ b/src/kvirc/ui/kvi_frame.h @@ -196,6 +196,7 @@ protected: virtual void resizeEvent(QResizeEvent *e); virtual void moveEvent(QMoveEvent *e); virtual bool focusNextPrevChild(bool next); + virtual void changeEvent(QEvent * event); void updatePseudoTransparency(); void installAccelerators(); |
