summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-06-10 13:05:17 -0500
committerSlávek Banko <slavek.banko@axis.cz>2012-06-13 21:27:50 +0200
commit7dc0d9e497e64e6883aeee7d1490f380b7514f03 (patch)
tree80bb27ffd615263b8d5b323936591177ee3153fb
parent4fd3190e4465a5756a953b6beb1ab7b01f6d03aa (diff)
downloadtdebase-7dc0d9e497e64e6883aeee7d1490f380b7514f03.tar.gz
tdebase-7dc0d9e497e64e6883aeee7d1490f380b7514f03.zip
Fix kate raising but not grabbing focus when the
--use parameter is used. This resolves bug report 692. (cherry picked from commit 377f84855a6141625e53e10778e4f47e1d05ae53)
-rw-r--r--kate/app/katemain.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/kate/app/katemain.cpp b/kate/app/katemain.cpp
index 371161de0..a6a6c74d5 100644
--- a/kate/app/katemain.cpp
+++ b/kate/app/katemain.cpp
@@ -231,7 +231,24 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
else
wRef.call("restore");
}
+ // The --use parameter forces Kate to use a single session window to host
+ // all opened files. Generally, that parameter works. Yet when a file is
+ // opened into Kate externally, such as from Konqueror, Kate will pop
+ // forward (raise) but not grab the focus (show). The following snippet
+ // resolves that problem. For whatever reason the hide call is needed
+ // before the raise and show otherwise the snippet fails. Some extra glue
+ // might be needed. With Kate open:
+ // "Right-click" on the title bar
+ // Select Advanced
+ // Select Special Application Settings (Not Special Window Settings)
+ // Select the Workarounds tab
+ // Enable the Focus stealing prevention check box
+ // Select the Force option
+ // Select the None option
+
+ wRef.call( "hide" );
wRef.call( "raise" );
+ wRef.call( "show" );
// stop startup notification
KStartupInfo::appStarted( );