summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-03-23 15:04:18 +0100
committerAndras Timar <andras.timar@collabora.com>2018-04-17 13:18:40 +0200
commit5275bcdec5e6ef70102c08e3e04f8715abc73e8d (patch)
treeb0a2a93ec734eda7ac59f0ecdb975d528d16de9a /vcl
parentb429699840487b720bef073b56b03889b7d29d23 (diff)
tdf#116563: floating windows must get input focus at some point
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 Reviewed-on: https://gerrit.libreoffice.org/51867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 0db4e7f60c92313327ae5b1e4307ed4fedfaa6f5) Reviewed-on: https://gerrit.libreoffice.org/52378 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit a7e8fa20d8c1a529ef3cd7f69d3afa2e06412800)
Diffstat (limited to 'vcl')
-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 f88e9b6219a8..1c929ba021bf 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1437,18 +1437,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 );
}
}