-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use header bar for window controls #2539
Comments
This is going to cause more problems with CSD, window geometry 'app-paintable' flag, etc.. |
2020-05-11 16:54:15: antoine uploaded file
|
2020-05-11 17:24:20: antoine uploaded file
|
2020-05-12 05:06:25: antoine uploaded file
|
Doh, turns out that we need to call Gtk.Widget.show_all and not Gtk.Widget.show to make this work. r26319 adds a basic menu, requires Also needed r26314 for better window geometry handling. TODO:
|
Improvements: |
2020-05-12 16:27:10: antoine uploaded file
|
2020-05-12 16:27:31: antoine uploaded file
|
More details about regressions in #2762. We had lost transparency support, r26403 restores that. New regression on Linux: non-transparent windows just don't work any more (needs
Looks like the visual doesn't match the one we requested? |
More UI improvements: r26444 + r26445 + r26446. Added some debug and found no difference between the transparent window and non-transparent ones, in both cases:
The The fix is in r26449: I'm not sure why but we have to be very careful on which widget we set the visual: even though the GTK window with a header bar already uses transparency, we can't ask for an RGBA visual... because that breaks. |
r26452: adds a "fullscreen" menu item and greys out "maximize" if it can't be used This will do for now. Works OK on Linux and Windows - not available on MacOS. |
2020-05-25 11:42:05: stdedos commented
|
Done in r26468.
The client will honour whatever setting applications request server-side, the client menu entry just provides an override.
"modal" is separate: Modal would also be complicated by the fact that we have the |
2020-05-28 08:35:27: stdedos commented
|
2020-05-28 08:35:39: stdedos uploaded file
|
2020-05-28 08:41:40: stdedos commented
|
It was already there, but very few applications actually request it so you're unlikely to see it.
I believe this is a theme issue, likely the same problem as reported in #2782.
Now using a custom icon for showing the "ticked" state rather than a
Done in r26492. |
r26845 adds a command line option for controlling the headerbar:
|
Best description I have found so far of the problem with GTK, size constraints and CSD: Maximize or fullscreen back-n-forth shrinks the terminal : gtk size negotiation nightmares: When creating a window you can't just call vte_terminal_set_size and let the system fit the window around that. You have to use gtk_window_set_default_size instead. But you need to know the difference in size between the window and the vte widget, and you can't measure that until after allocating a size to the window and realizing it and all its widgets. Things are further complicated because gtk_window_set_default_size seems to exclude the borders, but allocation and geometry hints include borders (and shadows). Further down that ticket: This atomicity is something Wayland, Mutter, GTK etc. folks (I'm not sure who exactly) have to figure out. GTK bug examples: [https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/129#note_654131] Maybe we could just not enforce size-constraints client side and leave it to the server instead? |
As of r26860, we can use the headerbar in more cases: we use the drawingarea's size-request to ensure the min-size is still honoured when the headerbar is used. |
2020-07-02 21:05:10: stdedos commented
|
Depends what you're trying to do.
The xpra client has its own command line option now:
Fixes that allow CSD to be used and get GTK to create a window of the size that we request. |
Spotted a new problem: on mswindows, some windows don't render (all black) with opengl enabled, a header bar, and 24-bit mode. (windows with transparency do..) Also #2747. |
It seems impossible to fix on win32, probably for the same reason we can't do transparency with opengl (#1682) as the headerbar also enables transparency for the whole window. So r26998 disables r26997 adds the missing man page entry. |
As in the example here:
/xpra/client/gtk_base/example/header_bar.py
, we can add our own window widgets to the header bar without changing its geometry.Either using a pancake menu or a few buttons.
Things we can do with this:
The text was updated successfully, but these errors were encountered: