summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-03-23 15:04:18 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-03-23 15:22:59 +0100
commit8fbe855acccea5ddde6750bc63abf734ba52ada3 (patch)
treef4175612a4d9a2b48031372d77829a9ad8b282c8
parent5520b23f6aba03dff84d5ba16c4234555636f560 (diff)
tdf#116563: floating windows must get input focus at some pointfeature/docking_windows
This partially reverts commit bb6a8dce405bd0f and means we need a different solution for tdf#48300 on X11-based Linux frontends. Send _NET_ACTIVE_WINDOW signal only if we want to activate window that has been minimized (ToTopFlags::RestoreWhenMin) or covered by other windows (ToTopFlags::ForegroundTask). Change-Id: I529baf6cc1174728b54bae4c658cf95631da19d6
-rw-r--r--vcl/unx/generic/window/salframe.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 4bdf8469671b..8f8bc056e054 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1426,18 +1426,14 @@ void X11SalFrame::ToTop( SalFrameToTop nFlags )
&& bMapped_ )
{
if( m_bXEmbed )
- {
askForXEmbedFocus( 0 );
- return;
- }
-
- if ( nFlags & SalFrameToTop::GrabFocus )
- {
+ else
+ XSetInputFocus( GetXDisplay(), aToTopWindow, RevertToParent, CurrentTime );
+ }
+ else if( ( nFlags & SalFrameToTop::RestoreWhenMin ) || ( nFlags & SalFrameToTop::ForegroundTask ) )
+ {
Time nTimestamp = pDisplay_->GetX11ServerTime();
GetDisplay()->getWMAdaptor()->activateWindow( this, nTimestamp );
- }
- else if ( nFlags & SalFrameToTop::GrabFocusOnly )
- XSetInputFocus( GetXDisplay(), aToTopWindow, RevertToParent, CurrentTime );
}
}