Open ging-dev opened 2 years ago
Hi @ging-dev that's super cool, completely headless and hack-free!
Do you know if it's possible to get the geometry of buttons? Perhaps it's in MetaFrameGeometry
, but I couldn't find libmetacity's documentation anywhere (I admit I'm lazy to read headers).
By the way, are you up to rewrite the whole thing using libmetacity? :sweat_smile:
Hi @ging-dev that's super cool, completely headless and hack-free!
Do you know if it's possible to get the geometry of buttons? Perhaps it's in
MetaFrameGeometry
, but I couldn't libmetacity's documentation anywhere (I admit I'm lazy to read headers).By the way, are you up to rewrite the whole thing using libmetacity? sweat_smile
There doesn't seem to be a way to get the geometry of the button. It would be better to use it as window decorations directly in xfwm4
I found the above code in compiz: https://github.com/jaijeet/compiz/blob/master/gtk/window-decorator/gwd-theme-metacity.c
I see, that's a pity, I'm wondering if we could get all the geometries from a real window, which may show up very briefly, then snap all images from the images generated by metacity.
There doesn't seem to be a way to get the geometry of the button. It would be better to use it as window decorations directly in xfwm4
That's the ultimate goal, Olivier already mentioned it makes sense to have this built-in Xfwm, perhaps using libmetacity would be ok for him as well. If you have an idea of how to implement this, please make a proposal in https://gitlab.xfce.org/xfce/xfwm4/-/issues/446 before committing time on something that may not be accepted.
Maybe we can use just gtk.. https://github.com/GNOME/metacity/blob/a0b41a8fb010b80477d134c97e0f3effd349a728/libmetacity/meta-theme-gtk.c#L662
😉
Hi @matiasdelellis, thanks for the hint, I started a draft at #7, it's almost perfect for Greybird, only icons in the backdrop state are incorrect, Adwaita buttons are still not there and I didn't test scale 2x yet.
Another approach I'm considering is GtkOffscreenWindow
, I'm already using it to get widget sizes, just taking screenshots of it isn't working for me.
Anyway, I need to set this aside for now, free time is really precious for me lately :grimacing: any help is more than welcome.
example: