Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Roman Gilg
@romangg:matrix.org
[m]
I see hmm. It's weird but I don't think it's a real issue. It somehow assumes that lay could be layer::count, which would be an issue as local layers variable only has 15 entries. Maybe accessing it with at would silence the warning.
i.e. layers.at(enum_index(lay)).push_back(win)
Tom Englund
@gulafaran:matrix.org
[m]
yeah well the even more weird thing is "KWin::enum_index(lay) (which evaluates to 15)." lay can never be 15, count is 12 if using the enums uh values
i guess another question not related to the MR is what if lay is unknown, -1 are we doing some UB here :p
Roman Gilg
@romangg:matrix.org
[m]
I guess -1 can never happen by the internal logic. But that shit is definitely old code without proper safeguards for stuff like this. 🙄
I mean going through an array by a layer enum which starts at -1 is typical 90s programming techniques on its own.
Tom Englund
@gulafaran:matrix.org
[m]
Roman Gilg: this code group/output could probably be moved to update_layer , and sorting just copying the list to a vector, using std::sort(vector.begin(), vector.end(), { return enum_index(win->layer()) < enum_index(win2-layer()) }; :p
oh well it has room for future improvements! now to rebase towards your new rules :p
Roman Gilg
@romangg:matrix.org
[m]
Is now a good time to switch over kwinft to C++20?
2 replies
I could make use of some C++20 concepts in my template code.
Tom Englund
@gulafaran:matrix.org
[m]
have mostly refactored my rules patches, but digging into some regression and the attempt at integration struct, but its a bit slow on this turd rebuilding xD
next week tho then il enjoy my ryzens again xD
*refactored/rebased
Roman Gilg
@romangg:matrix.org
[m]
But better to concentrate first on getting the template objects done somehow and afterwards make them pretty with C++20.
Tom Englund
@gulafaran:matrix.org
[m]
are they related to those lambda capture changes i found last time?
Roman Gilg
@romangg:matrix.org
[m]
Hmm, can't remember. Do you have a link?
Tom Englund
@gulafaran:matrix.org
[m]
kwinft/kwinft!168 first thread
but seems those only caused warnings i think
not that that draft will apply nor quite "rebase" any more since quite a lot changed so could technically close it i guess
Roman Gilg
@romangg:matrix.org
[m]
First build error for me is this:
diff --git a/input/wayland/redirect.cpp b/input/wayland/redirect.cpp
index 666fe6b67..bc7b6c06c 100644
--- a/input/wayland/redirect.cpp
+++ b/input/wayland/redirect.cpp
@@ -471,17 +471,18 @@ void redirect::handle_fake_input_device_added(Wrapland::Server::FakeInputDevice*
                          device->setAuthentication(true);
                      });

-    auto devices
-        = fake::devices<input::platform>({std::make_unique<fake::pointer>(device, &platform),
-                                          std::make_unique<fake::keyboard>(device, &platform),
-                                          std::make_unique<fake::touch>(device, &platform),
-                                          platform});
+    fake::devices<input::platform> devices{
+        .pointer = std::make_unique<fake::pointer>(device, &platform),
+        .keyboard = std::make_unique<fake::keyboard>(device, &platform),
+        .touch = std::make_unique<fake::touch>(device, &platform),
+        .platform = platform,
+    };

     platform_add_pointer(devices.pointer.get(), platform);
     platform_add_keyboard(devices.keyboard.get(), platform);
     platform_add_touch(devices.touch.get(), platform);

     fake_devices.insert({device, std::move(devices)});
 }
While the aggregate can be fixed with this new lovely aggregate syntax, it won't work with the move ctors defaulted in the fake::devices struct.
But if I remove the move ctors the insert into fake_devices map doesn't work anymore. :/
Then there was a second build error with sstream. But I stopped at this point.
Tom Englund
@gulafaran:matrix.org
[m]
right so new things then, but yeah once i get access to my ryzen i can test around more with building with c++20 hm
Roman Gilg
@romangg:matrix.org
[m]
I hope until then the base-objects-2 branch is finished. I want that branch getting done so bad! 😂
Tom Englund
@gulafaran:matrix.org
[m]
isnt technically that called designated initializers that is only entering in c++20?
Roman Gilg
@romangg:matrix.org
[m]
You mean in comparison to what was in there before?
Tom Englund
@gulafaran:matrix.org
[m]
yeah
Roman Gilg
@romangg:matrix.org
[m]
Actually I don't know if and how the current master code works in this regard. <del>Initializer lists</del> List initialization is a bit black magic to me.
In theory it's available since C++11: https://en.cppreference.com/w/cpp/language/constructor
Strike that.
Tom Englund
@gulafaran:matrix.org
[m]
Tom Englund
@gulafaran:matrix.org
[m]
Roman Gilg: so yeah the draft !229 is about as far as im capable of, its still missing the integration struct initalization. and mostly because either of that struct not being implented or something else i missed. each time i test things it destroys my ~/.config/somekwinrulerc so all rules get all bonkers :P so its a bit uh hard to know if all the side effects are from the bonkers configs left around or because of the code
1 reply
seems the thread i made commenting on it didnt update the visible code but its a bit changed in the commit, worth knowing.
now to reset my poor ~/.config/kwin files 😄
Tom Englund
@gulafaran:matrix.org
[m]
unless testXdgShellClientRules is the one bonkering my local rules when i run the test locally.
anyhow thats where im at :p
Juan Jose Casafranca
@jjcasmar_gitlab
does kwinft supports nvidia drivers with multiple screens?
i keep getting some glitches (right mouse on desktop doesn't show the menu) and some crashes. also decorations seems to be different than with kwin, not sure if that is normal
Tom Englund
@gulafaran:matrix.org
[m]
@jjcasmar_gitlab: well it should support that, is this on wayland or xorg? might be a new regression from the recent big refactors, not all settings and setups gets tested with the limited workforce working on kwinft. when most the big milestones are done it should stabilize a bit tho
Juan Jose Casafranca
@jjcasmar_gitlab
its wayland
Roman Gilg
@romangg:matrix.org
[m]
@jjcasmar_gitlab: It's cool though that Wayland seems to work with reduced reliability already in general on Wayland. Thanks for the feedback. And yes, as Tom said, once big milestones are done we'll look again more into stabilizing. If you wanna help with testing or code you're most welcome.
Roman Gilg
@romangg:matrix.org
[m]
After I got this base-objects-2 branch finished I can take a look at !229.
Juan Jose Casafranca
@jjcasmar_gitlab
I dont mind testing and doing some code if needed. But I would probably need some help to bootstrap
Roman Gilg
@romangg:matrix.org
[m]
@jjcasmar_gitlab: Sure thing. :) Easiest way to get started is follow the steps outlined in https://gitlab.com/kwinft/kwinft/-/blob/master/CONTRIBUTING.md
First you learn how to log and debug the program efficiently. Later on it also helps with building master.
Tom Englund
@gulafaran:matrix.org
[m]
Roman Gilg: looks like either cppcheck version has catched up or the kwinft code has changed enough, it doesnt segfault on any of the files now.
Roman Gilg
@romangg:matrix.org
[m]
Great! 😀
So should we try to integrate it in our ci?