Bug 442941 - kwin_x11 recommends using --replace flag when another window manager is running and it would have no effect
Summary: kwin_x11 recommends using --replace flag when another window manager is runni...
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.22.4
Platform: Fedora RPMs Linux
: LO minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2021-09-25 14:41 UTC by Alexander Potashev
Modified: 2023-01-18 14:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Potashev 2021-09-25 14:41:49 UTC
SUMMARY
kwin_x11's --replace flag has no effect:

```
$ kwin_x11 --replace
kwin: another window manager is running (try using --replace)
```
(and nothing else happens)

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Vlad Zahorodnii 2021-09-27 19:39:45 UTC
Works fine for me. Is the other wm still responsive when running kwin_x11 --replace? It seems like kwin fails to select substructure redirect events.
Comment 2 Nate Graham 2021-09-27 21:04:34 UTC
Works for me. Are you by any chance using Wayland?
Comment 3 David Edmundson 2021-10-05 16:14:53 UTC
Not reproducible, needs a lot more info.
Comment 4 Alexander Potashev 2021-10-05 19:01:17 UTC
Ah, it happens when trying to replace fluxbox with kwin_x11.

Steps to reproduce:
 1. Start a Plasma X11 session
 2. Open a terminal (e.g. Konsole or Yakuake)
 3. Run `kwin_x11 --replace`. (This is handy to then terminate the window manager altogether.)
 4. Press Ctrl+C to terminate kwin_x11. (fluxbox won't start otherwise.)
 5. Run `fluxbox`
 6. In another terminal tab, run `kwin_x11 --replace`

OBSERVED RESULT
```
$ kwin_x11 --replace
kwin: another window manager is running (try using --replace)
```

EXPECTED RESULT
Should terminate fluxbox and start kwin_x11.
Comment 5 Nate Graham 2021-10-05 19:20:09 UTC
--replace is meant to restart KWin itself. Not to kill it and start another window manager, or vice versa.
Comment 6 Alexander Potashev 2021-10-05 19:22:54 UTC
(In reply to Nate Graham from comment #5)
> --replace is meant to restart KWin itself. Not to kill it and start another
> window manager, or vice versa.

Okay. Then the error message probably shouldn't suggest "try using --replace" when it cannot have effect.
Comment 7 Nate Graham 2021-10-05 19:28:25 UTC
Fair enough.
Comment 8 Vlad Zahorodnii 2023-01-18 14:47:26 UTC
fluxbox doesn't release WM_S selection. I can reproduce this issue with other WMs too, e.g. openbox. Please report this issue to fluxbox developers.