GNOME Bugzilla – Bug 761571
Opaque region incorrectly calculated for fullscreen windows
Last modified: 2016-02-07 17:19:50 UTC
Created attachment 320465 [details] [review] window: don't subtract corners from fullscreen opaque region For a fullscreen totem window, _NET_WM_OPAQUE_REGION(CARDINAL) is currently "7, 0, 1906, 7, 0, 7, 1920, 1073" for my 1920x1080 display. That does not reflect the fact that my window is filling the screen. After this patch the same test now gives the expected value: 0, 0, 1920, 1080
I'm a bit confused why it's giving us corners in the first place. I thought the CSS shouldn't specify any corners if we're fullscreen.
(In reply to Jasper St. Pierre from comment #1) > I'm a bit confused why it's giving us corners in the first place. I thought > the CSS shouldn't specify any corners if we're fullscreen. I don't think fullscreen is reflected in the css state at all, so there is no way we could select different css for fullscreen windows.
Review of attachment 320465 [details] [review]: I guess this is the best we can do
(In reply to Matthias Clasen from comment #2) > I don't think fullscreen is reflected in the css state at all, so there is > no way we could select different css for fullscreen windows. Then why are our corners not being rounded in fullscreen mode? Company recommended a refactor along the lines of gtk_window_is_showing_decorations which we'd use instead of all the special cases (along with gtk_window_should_show_titlebar, etc.).
(In reply to Matthias Clasen from comment #2) > (In reply to Jasper St. Pierre from comment #1) > > I'm a bit confused why it's giving us corners in the first place. I thought > > the CSS shouldn't specify any corners if we're fullscreen. > > I don't think fullscreen is reflected in the css state at all, so there is > no way we could select different css for fullscreen windows. Then for what fullscreen class is used? https://git.gnome.org/browse/gtk+/tree/gtk/gtkwindow.c#n7434 .fullscreen { border-radius: 60px } does work, tried also with .maximized, but at least with nautilus it gave unexpected result.
Created attachment 320481 [details] maximized
.fullscreen decoration { border-radius: 0; } does remove rounded corners. Also there is some problem with .maximized and .tiled - they are supposed to remove rounded corners, but it works only when windows is focused. When window lose focus maximized and tiled windows have rounded corners... Adding .tiled headerbar { border-radius: 0; } manually in inspector removes rounded corners from headerbar, but there is already such rule in gtk-contained.css: https://git.gnome.org/browse/gtk+/tree/gtk/theme/Adwaita/gtk-contained.css#n1838 Looks like it is ignored because of .titlebar:not(headerbar). This was tested with nautilus. Tweak Tool and Polari does not remove rounded corners even when window focused.
(In reply to Alberts Muktupāvels from comment #5) > (In reply to Matthias Clasen from comment #2) > > (In reply to Jasper St. Pierre from comment #1) > > > I'm a bit confused why it's giving us corners in the first place. I thought > > > the CSS shouldn't specify any corners if we're fullscreen. > > > > I don't think fullscreen is reflected in the css state at all, so there is > > no way we could select different css for fullscreen windows. > > Then for what fullscreen class is used? > https://git.gnome.org/browse/gtk+/tree/gtk/gtkwindow.c#n7434 > > .fullscreen { border-radius: 60px } does work, tried also with .maximized, > but at least with nautilus it gave unexpected result. Oh, I had totally forgotten that we use style classes for that, I was thinking about states.
Is that patch still needed? That patch could break fullscreen windows if someone really wants rounded corners on them. When I tested .fullscreen decoration { border-radius: 0; } was enough. _NET_WM_OPAQUE_REGION did return correct data.
I think we should just fix the theme
Might not be related to this bug, but should not be rounded corners removed also from .maximized decoration?