https://bugs.kde.org/show_bug.cgi?id=466482

            Bug ID: 466482
           Summary: kwin scripting interface missing important tiling
                    methods
    Classification: Plasma
           Product: kwin
           Version: 5.27.1
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: scripting
          Assignee: kwin-bugs-n...@kde.org
          Reporter: vaugha...@protonmail.com
  Target Milestone: ---

SUMMARY
***
I have been exploring the (completely undocumented) brand new kwin tiling
interface exposed in the scripts. After getting a grasp on the interface and
examining the Doxygen for kwin, I attempted to write a tiling script that would
automatically tile all windows to the defined layout. Unfortunately, this did
not work. Further inspection of the KWin::Tile object via dumping the methods
of the javascript object into strings has revealed that there is no addWindow()
method for the Tile object. The windows array of the Tile object also seems to
be immutable, or at least not pushable. There are several missing functions in
the javascript interface, but this one (and deleteWindow(), etc.) renders the
entire new tiling API almost useless.

If this method happens to exist and is hidden below the surface of the API,
official documentation would be very much appreciated.
***


STEPS TO REPRODUCE
1. Use the script located at
https://github.com/zeroxoneafour/kwin_tiling/blob/master/utils/dump_class_info.js
in the plasma-interactiveconsole --kwin, substituting class_name for a tile
like workspace.tilingForScreen(workspace.currentScreen).rootTile (the root tile
of the current screen)
2. Open journalctl --user --no-pager -e and look at the output of the script

OBSERVED RESULT
There is no line with addWindow: function() { [native code] }

EXPECTED RESULT
A line appears with the functions addWindow and removeWindow, as is documented
in the Doxygen I generated at
https://zeroxoneafour.github.io/kwin_tiling/kwin_doxygen/class_k_win_1_1_tile.html

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.1.12-zen1-1-zen (64-bit)
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I have tried calling addWindow(window) even after seeing the script output
results and it is still undefined. I have called it on non-root windows, and
have observed that, although the windows array of the Tile object changes based
on whether a window is tiled or not, it cannot be modified with
addWindow(window) or windows.push(window).

All of my findings can be found at https://zeroxoneafour.github.io/kwin_tiling/

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

Reply via email to