winft / wrapland

Qt/C++ library wrapping libwayland
GNU Lesser General Public License v2.1
6 stars 2 forks source link

Remodel Plasma window and virtual desktop management #49

Closed romangg closed 8 months ago

romangg commented 4 years ago

These two classes are connected but besides that are pretty contained.

Remodeling should be straight forward, but it's a lot of work since the class has many methods.

romangg commented 4 years ago

In GitLab by @erreur404 on May 1, 2020, 14:27

hello, I want some guidelines for class. PlasmaWindow::Private have QVector of wlRessource so I cant convert her directly to Ressource...

the question is : i convert the class for working like xdgOutput class?

i do not herit of Ressource ?

romangg commented 4 years ago

Hmm, I see. The PlasmaWindow is still a resource though on the Wayland side.

The question you have to ask yourself are these: What does a PlasmaWindow reference? Is it per resource, per window, per surface?

When you look at getWindowCallback in the old code it does a weird thing: it creates a "temporary" PlasmaWindow in case there is none found in the list of windows (and the elements in this list are referenced by an "internal window id").

Such a construct hints already at the overall design of these classes or even of the overall protocol being broken. But at the moment we have to work with what we got here.

So coming back to getWindowCallback you see that a PlasmaWindow in general is independent of resources created in reference to it.

I think you can do as follow:

romangg commented 4 years ago

mentioned in commit d7bd3af8bf5846b9ada486f54d11d1a634d4b589

romangg commented 4 years ago

Closed by d7bd3af8bf5846b9ada486f54d11d1a634d4b589.

romangg commented 4 years ago

closed

romangg commented 4 years ago

mentioned in commit 9214ac1deaff61018f6a1588ca71eb858ebdcfdd