Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Tom Englund
@gulafaran:matrix.org
[m]
that would explain that because ive bisected further then i think it should be possible
and it still occured! :P
Tom Englund
@gulafaran:matrix.org
[m]
also whats worth noting is that firefox adds two surfaces/windows on each uh "task" open kwin debug console, any window konsole/plasma or whatever adds one entry. open firefox? firefox adds one entry and one very weird unnamed one. https://gitlab.com/kwinft/kwinft/-/merge_requests/229/diffs?commit_id=64867a31456a5b72c9ffb45a818392ee6268c19f debug console needs this tho for that so it doesnt crash :p , open the hamburger menu? two entries appear etc.
https://i.imgur.com/WSX1UzD.jpg pretty much like this
oh well gotta hit the bed
Tom Englund
@gulafaran:matrix.org
[m]
Tom Englund: soon making a MR with a few changes to debug console, think i need this tool before i can proceed with both the firefox issue and the rules draft :p
eh Roman Gilg above. seems i highlighted myself :D
figured out why it got halfly decorated and placed outside screen geometry and crashing etc, was simply X11BypassWindowManagerHint , removed that on the wayland side and tada it gets positioned correctly, decorated etc
now just to figure out why window propertys just list "objectName" and im pushing :p
1 reply
Tom Englund
@gulafaran:matrix.org
[m]
Roman Gilg: yeah expand the list and any window and it should list a bunch of useful properties
Tom Englund
@gulafaran:matrix.org
[m]
Roman Gilg: are windows not a qobject anymore or toplevel or such?
Roman Gilg
@romangg:matrix.org
[m]
Tom Englund: They are still a qobject, but the Q_PROPERTY macros have been moved from Toplevel class to the script::window class.
So that's why the runtime may not find the properties anymore.
Tom Englund
@gulafaran:matrix.org
[m]
aha hm
Roman Gilg
@romangg:matrix.org
[m]
where are the properties read out in the debug console?
Tom Englund
@gulafaran:matrix.org
[m]
good question i think ive read through the source 10 times and i dont quite get it
Roman Gilg
@romangg:matrix.org
[m]
There is this console_model::propertyData function. maybe that's it.
2 replies
Tom Englund
@gulafaran:matrix.org
[m]
its like all its doing is checking for index, columns, rows and simply adds the window and it magically knows? :D
Roman Gilg
@romangg:matrix.org
[m]
And get_client_property_data
In get_client_property_data it does an implicit cast of the window to QObject* when calling propertyData
So maybe we could at this position cut the patient open and instead of doing a cast of the window a cast of the respective script::window.
This should at least work for windows published to the scripts system (windows with control in general).
So here don't cast from the window, but from the window in script namespace.
That's this class with all the juicy Q_PROPERTYs: https://gitlab.com/kwinft/kwinft/-/blob/master/scripting/window.h
Tom Englund
@gulafaran:matrix.org
[m]
Roman Gilg: well they dont inherit eachother so how do i cast that?
Roman Gilg
@romangg:matrix.org
[m]
I assume (hope) it's somewhat composited into it. Or if not (yet) then we need to go via the global space instance.
Let me quickly check.
So composited it is not :/
Ah no! It is composited :D
win::control::scripting
Get a pointer to the scripting interface of a window:
scripting::window* get_scripting (Toplevel& x)
{
    if (!x.control) {
        return nullptr;
    }
    return x.control->scripting.get();
}
Roman Gilg
@romangg:matrix.org
[m]
That should even allow to remove all if-cases and the virtual override of the get_client_property_data function.
But it also means we can't show properties at the moment of windows that don't have a control interface. :/
But still better than showing none at all. ;)
Tom Englund
@gulafaran:matrix.org
[m]
yeah il test :p
Roman Gilg
@romangg:matrix.org
[m]
Btw I'm working now for a week non-stop on this damn templating of everything. That's why I'm maybe not so reactive with replies and reviews at the moment. It's kind of exhausting. But there is light at the end of the tunnel.
Tom Englund
@gulafaran:matrix.org
[m]
Roman Gilg: oh dont worry, im mostly spending my late nights fiddling. trying to spend as much of my last vacation days out boating/chilling :D
Roman Gilg
@romangg:matrix.org
[m]
Sounds nice! 😄 Friend of me visited me on the weekend when travelling from Nordsee to Bayern. He was in Sweden with his van and girlfriend for a few days. He enjoyed it but on the photos it looked quite cold I have to say. At least a lot colder in comparison to how it is now in Berlin.
They liked the colder weather though.
Tom Englund
@gulafaran:matrix.org
[m]
Haha yeah well i guess its what you get used to june - august averages like 18 - 22C daytime with some random heatdays of 27, and nights is like 12 - 15C
I do live quite far up north 😂
Hm silly phone wont let me copy url, but luleå
2 replies
Tom Englund
@gulafaran:matrix.org
[m]
also sadly using scripting doesnt help either returns "objectName" anyways, and ofc nothing for internal windows etc without control hm
Tom Englund
@gulafaran:matrix.org
[m]
aha hold up we got a few get_property_index and get_property_count etc
Roman Gilg
@romangg:matrix.org
[m]
Right, I noticed on my refactors you also need to change type we get the property count from.
Tom Englund
@gulafaran:matrix.org
[m]
Roman Gilg: yay it works, so technically i could implent some kind of internal_window or window without control scripting classes for this aswell?
1 reply
or well hm "win->control->scripting.get();" no
Roman Gilg
@romangg:matrix.org
[m]
Then we would also not need to "misuse" the scripting::window class. Have it nicely separated instead.
Tom Englund
@gulafaran:matrix.org
[m]
yeah