You are not logged in.

#1 2026-02-22 10:26:03

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 310

Kwrite window not getting focus when opened

I'm using Archlinux with the Cinnamon desktop with X11

When launching kwrite from a launcher icon, or from the the nemo file manager (like when opening a text file there), the kwrite window is at the front, but does not get focus, so when you then type it's sending those keystrokes to whatever other random window had focus at that point

Only kwrite has this problem, other qt programs like kolourpaint do not

What could be wrong with kwrite here and how can this be fixed in cinnamon? Some setting of cinnamon that used to exist like 'focus stealing prevention' that the internet is referring to, don't exist anymore today

Thanks!

Last edited by aardwolf (2026-02-22 10:27:20)

Offline

#2 2026-02-22 13:20:27

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,432

Re: Kwrite window not getting focus when opened

Actually muffin doesn't seem to have anything like this, https://github.com/linuxmint/muffin/issues/646 & https://github.com/linuxmint/cinnamon/issues/8059 and it seems alacritty is also affected?
https://github.com/linuxmint/muffin/issues/772

Distributing the focus to new windows is mostly the WMs responsibility and only indirectly depends on the client.

https://github.com/linuxmint/muffin/iss … 3865781597 is specifically interesting but it seems odd that different KMainWindow users would act differently here.
Maybe kwrite tries to explicitly raise itself for some reason?

Does kwrite operate as singleton process (ie. one process spawns just new windows when re-invoked)?

Offline

#3 2026-02-22 17:24:36

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 310

Re: Kwrite window not getting focus when opened

kwrite looks in 'ps -eal' to get multiple processes when launching it multiple times

Offline

#4 2026-02-22 21:03:42

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,432

Re: Kwrite window not getting focus when opened

Possibly https://invent.kde.org/utilities/kate/- … eads#L1780 - the behavior would be peculiar to muffin.
The patch in https://github.com/linuxmint/muffin/iss … 3865990194 refers to https://github.com/linuxmint/muffin/com … 43394R5586

You could see whether that fixes it for kwrite as well.

Offline

Board footer

Powered by FluxBB