esjeon / krohnkite

A dynamic tiling extension for KWin
MIT License
1.67k stars 68 forks source link

`BorderlessMaximizedWindows=true` in kwinrc causes krohnkite to overload and freeze kwin #32

Closed hjri closed 4 years ago

hjri commented 5 years ago

Symptom At some point and some conditions, krohnkite seemingly enters endless loop causing kwin to freeze and system nearly unresponsive. xorg starts eating a lot of CPU, with kwin taking second place.

How to Reproduce

  1. Install and enable script
  2. Try to do something
  3. System freezes, you have to Ctrl-Alt-F_ to TTY to kill kwin.

Kwin logs show spam something like this:

qml: [23.602] onWindowGeometryChanged: window=Window(KWin(4e00001.skype))
qml: [23.603] onWindowGeometryChanged: window=Window(KWin(4e00001.skype))
qml: [23.603] onWindowGeometryChanged: window=Window(KWin(4e00001.skype))
qml: [23.603] onWindowGeometryChanged: window=Window(KWin(4e00001.skype))
qml: [23.603] onWindowGeometryChanged: window=Window(KWin(4e00001.skype))
qml: [23.603] onWindowGeometryChanged: window=Window(KWin(4e00001.skype))
qml: [23.603] onWindowGeometryChanged: window=Window(KWin(4e00001.skype))
qml: [23.604] onWindowGeometryChanged: window=Window(KWin(4e00001.skype))
qml: [23.604] setTimeout/callback: poolSize=1

Application could be different, previous time it was quassel.

Expected behavior No freezes

Environment

Notes krohnkite config:

qml: KROHNKITE: starting the script
qml: [0] Config: Config({
  "enableMonocleLayout": true,
  "enableQuarterLayout": true,
  "enableSpreadLayout": false,
  "enableStairLayout": false,
  "enableTileLayout": true,
  "maximizeSoleTile": true,
  "monocleMaximize": true,
  "mouseAdjustLayout": true,
  "noTileBorder": true,
  "screenGapBottom": 0,
  "screenGapLeft": 0,
  "screenGapRight": 0,
  "screenGapTop": 0,
  "tileLayoutGap": 0,
  "layoutPerActivity": true,
  "layoutPerDesktop": true,
  "floatUtility": true,
  "floatingClass": [
    "keepassxc"
  ],
  "floatingTitle": [],
  "ignoreActivity": [],
  "ignoreClass": [
    "krunner",
    "yakuake",
    "spectacle",
    "kded5",
    "steam",
    "plasmashell"
  ],
  "ignoreScreen": [],
  "ignoreTitle": []
})

i have BorderlessMaximizedWindows=true in kwinrc

hjri commented 5 years ago

seems that setting BorderlessMaximizedWindows=false resolves this issue it seems

esjeon commented 5 years ago

seems that setting BorderlessMaximizedWindows=false resolves this issue it seems

It seems like, if the option is enabled, KWin competes against Krohnkite to reset the size of the maximized window. I'm gonna see if this is fixable from the script side.

esjeon commented 4 years ago

This issue is resolve by supporting the KWin native maximization (#64, 4ac5360). There's no more race condition AND windows can be maximized.