[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2024-03-31 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

Nate Graham  changed:

   What|Removed |Added

   See Also||https://bugs.kde.org/show_b
   ||ug.cgi?id=442265

--- Comment #27 from Nate Graham  ---
Ah in that case the issue is Bug 442265.

Looks like it's my bad that this mutated back in 2019 from a Windows bug into a
Wayland bug. Sorry about that.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2024-03-28 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

Christoph Cullmann  changed:

   What|Removed |Added

 Resolution|--- |NOT A BUG
 Status|REPORTED|RESOLVED

--- Comment #26 from Christoph Cullmann  ---
(In reply to Aleix Pol from comment #25)
> This bug is a bit confusing, it's originally for Microsoft Windows but it
> seems to have mutated?
> 
> On Wayland, if it's not working with Krusader or whatever, we need to have
> the application adapted to produce a token that will be handed over.
> 
> In the case of Konsole, we are not doing that because konsole (bash?)
> doesn't have a way to create this token. We should make Konsole create the
> environment variable that communicates the token. As such it's a Konsole
> bug, not Kate's.
> 
> Kate works fine, that's why it works when launched from an app that does the
> right thing, like dolphin.

Ok, if for Wayland Kate is fine, we can close this. At least for Windows I
found no proper way to make it work.

Thanks for taking a look at this @aleix!

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2024-03-28 Thread Aleix Pol
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #25 from Aleix Pol  ---
This bug is a bit confusing, it's originally for Microsoft Windows but it seems
to have mutated?

On Wayland, if it's not working with Krusader or whatever, we need to have the
application adapted to produce a token that will be handed over.

In the case of Konsole, we are not doing that because konsole (bash?) doesn't
have a way to create this token. We should make Konsole create the environment
variable that communicates the token. As such it's a Konsole bug, not Kate's.

Kate works fine, that's why it works when launched from an app that does the
right thing, like dolphin.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2024-03-28 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #24 from Christoph Cullmann  ---
(In reply to Nate Graham from comment #23)
> It's definitely possible to fix on Wayland, you just have to handle the
> activation token properly. I'm CCing some people who know how to do this.

If I start Kate it the terminal with

kate xxx.txt

I fail to see what I should send over via dbus to the main instance.

But if that is feasible on Wayland, help is welcome.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2024-03-27 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

Nate Graham  changed:

   What|Removed |Added

 Status|RESOLVED|REPORTED
 CC||aleix...@kde.org,
   ||k...@david-redondo.de,
   ||nicolas.fe...@gmx.de
 Ever confirmed|1   |0
 Resolution|NOT A BUG   |---

--- Comment #23 from Nate Graham  ---
It's definitely possible to fix on Wayland, you just have to handle the
activation token properly. I'm CCing some people who know how to do this.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2024-03-27 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

Christoph Cullmann  changed:

   What|Removed |Added

 Resolution|--- |NOT A BUG
 Status|CONFIRMED   |RESOLVED

--- Comment #22 from Christoph Cullmann  ---
I don't think we can fix that, like on Wayland the security mechanism to avoid
focus stealing and Co. don't allow for that.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2023-12-29 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #21 from Christoph Cullmann  ---
We do now


void KateAppAdaptor::activate(const QString )
{
KateMainWindow *win = m_app->activeKateMainWindow();
if (!win) {
return;
}

// like QtSingleApplication
win->setWindowState(win->windowState() & ~Qt::WindowMinimized);
win->raise();
win->activateWindow();

// try to raise window, see bug 407288
if (KWindowSystem::isPlatformX11()) {
#if HAVE_X11
KStartupInfo::setNewStartupId(win->windowHandle(), token.toUtf8());
#endif
} else if (KWindowSystem::isPlatformWayland()) {
KWindowSystem::setCurrentXdgActivationToken(token);
}

KWindowSystem::activateWindow(win->windowHandle());
}

that still is not enough, I would assume that is the same issue as on Wayland,
Windows just doesn't allow for the window to be raised, one just gets the
notification in the task bar.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2023-08-04 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

Christoph Cullmann  changed:

   What|Removed |Added

 Status|REOPENED|CONFIRMED

--- Comment #20 from Christoph Cullmann  ---
Yeah, doesn't work as it should.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2023-08-03 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=407288

gkub...@gmail.com changed:

   What|Removed |Added

 CC||gkub...@gmail.com
 Resolution|FIXED   |---
 Status|RESOLVED|REOPENED
Version|18.12.3 |23.04.3

--- Comment #19 from gkub...@gmail.com ---
I have installed Kate 23.04.3 in Windows 11 Enterprise (Version 21H2, OS build
22000.2176) and found that this bug has occurred again. If I double-click on a
text file in Windows File Explorer, then Kate will open that file in the
foreground as it should. If I then bring File Explorer to the foreground and
double-click a different text file, that file will open in Kate, but Kate will
remain in the background.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-07-15 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

Nate Graham  changed:

   What|Removed |Added

 CC||michal.m...@mitec.cz

--- Comment #18 from Nate Graham  ---
*** Bug 409677 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-07-14 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

Christoph Cullmann  changed:

   What|Removed |Added

  Latest Commit|https://commits.kde.org/kat |https://commits.kde.org/kat
   |e/7ecdd0eaf94b3bba392f547a1 |e/fd101540c21847df6df90cb6c
   |5594fb389e75f30 |546f6fdf92b74f6

--- Comment #17 from Christoph Cullmann  ---
Git commit fd101540c21847df6df90cb6c546f6fdf92b74f6 by Christoph Cullmann.
Committed on 14/07/2019 at 11:58.
Pushed by cullmann into branch 'master'.

use same code as dolphin for window raising
works fine for me, too, even for minimized windows

M  +4-1kate/kateappadaptor.cpp

https://commits.kde.org/kate/fd101540c21847df6df90cb6c546f6fdf92b74f6

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-06-02 Thread george fb
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #16 from george fb  ---
> KStartupInfo::setNewStartupId(window(), KStartupInfo::startupId());
> KWindowSystem::activateWindow(window()->effectiveWinId());
Works for Dolphin so it should work for Kate too.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-30 Thread Sergio Martins
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #15 from Sergio Martins  ---
Git commit 18b05cb14bddfc1568d3082dfd862c62bcf77440 by Sergio Martins.
Committed on 30/05/2019 at 19:18.
Pushed by smartins into branch 'master'.

Fix window activation on Windows

Windows doesn't use the dbus stuff and instead uses qtsingleapplication,
which does support window activation if setActivationWindow is called.

setActivationWindow wasn't called anywhere.

Differential Revision: 21485

M  +4-0kate/main.cpp

https://commits.kde.org/kate/18b05cb14bddfc1568d3082dfd862c62bcf77440

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-29 Thread Dominik Haumann
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #14 from Dominik Haumann  ---
There is another addition proposed here:
https://phabricator.kde.org/D21485

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-26 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #13 from Nate Graham  ---
Worth a try, at least. :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-26 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #12 from Christoph Cullmann  ---
That means I should try

KStartupInfo::setNewStartupId(win(), KStartupInfo::startupId());
KWindowSystem::activateWindow(win()->effectiveWinId());

instead of 

KWindowSystem::raiseWindow(win->winId());

?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-26 Thread george fb
https://bugs.kde.org/show_bug.cgi?id=407288

george fb  changed:

   What|Removed |Added

 CC||fbg...@gmail.com

--- Comment #11 from george fb  ---
There's info on how to activate windows here
https://phabricator.kde.org/D16648#450590

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-24 Thread Martin Flöser
https://bugs.kde.org/show_bug.cgi?id=407288

Martin Flöser  changed:

   What|Removed |Added

 CC|mgraess...@kde.org  |

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-24 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #10 from Nate Graham  ---
Some of the KWin developers may be able to help. I'll see if I can make them
aware.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-24 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #9 from Christoph Cullmann  ---
If somebody wants to cherry-pick that, feel free.
I am not sure if that is the right way to fix it thought, given the docs state
one shall not use that method for what we do :=)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-24 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #8 from Nate Graham  ---
Thanks! Is this backportable to the stable branch?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-24 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #7 from Christoph Cullmann  ---
I commited now the aggressive variant.
That at least works here reasonable well, even if you open a file, hide the
window, open the same file again from some konsole via "kate ...".
All other calls didn't to the trick for that.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-24 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

Christoph Cullmann  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
  Latest Commit||https://commits.kde.org/kat
   ||e/7ecdd0eaf94b3bba392f547a1
   ||5594fb389e75f30
 Resolution|--- |FIXED

--- Comment #6 from Christoph Cullmann  ---
Git commit 7ecdd0eaf94b3bba392f547a15594fb389e75f30 by Christoph Cullmann.
Committed on 24/05/2019 at 13:36.
Pushed by cullmann into branch 'master'.

try a bit harder to raise window for already running application

M  +2-6kate/kateapp.cpp
M  +3-0kate/kateappadaptor.cpp

https://commits.kde.org/kate/7ecdd0eaf94b3bba392f547a15594fb389e75f30

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-24 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

--- Comment #5 from Christoph Cullmann  ---
This is the only thing that works for me:

+
+// try to raise window, see bug 407288
+KWindowSystem::raiseWindow(win->winId());

but the documentation states only pagers should use that.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-22 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

Nate Graham  changed:

   What|Removed |Added

   See Also||https://bugs.kde.org/show_b
   ||ug.cgi?id=371220

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-22 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

Nate Graham  changed:

   What|Removed |Added

 CC||k...@davidedmundson.co.uk,
   ||mgraess...@kde.org,
   ||vladz...@gmail.com

--- Comment #4 from Nate Graham  ---
I think what's happening here is that KWin is ignoring the non-forceful request
to raise the window because of some issue with the way the call is structured
or how Kate is activated. KWin requires that it be done in a very specific way
or else activateWindow() doesn't work. CCing some KWin developers who can shed
more light on the situation.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-22 Thread Christoph Cullmann
https://bugs.kde.org/show_bug.cgi?id=407288

Christoph Cullmann  changed:

   What|Removed |Added

 CC||cullm...@kde.org

--- Comment #3 from Christoph Cullmann  ---
We do this in the code:


void KateAppAdaptor::activate()
{
KateMainWindow *win = m_app->activeKateMainWindow();
if (!win) {
return;
}

// like QtSingleApplication
win->setWindowState(win->windowState() & ~Qt::WindowMinimized);
win->raise();
win->activateWindow();
}

Before we were more "foreful", this got removed in bug 371220

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-12 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

Nate Graham  changed:

   What|Removed |Added

 CC||raphael@jakse.fr

--- Comment #2 from Nate Graham  ---
*** Bug 407286 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.

[kate] [Bug 407288] Kate doesn't bring existing session into foreground

2019-05-12 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=407288

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org
 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1
   Keywords||regression, usability

--- Comment #1 from Nate Graham  ---
Can confirm the behavior on Linux too, on both Manjaro (Kate 19.04.0) and KDE
Neon dev unstable (Kate from git master).

-- 
You are receiving this mail because:
You are watching all bug changes.