After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 659854 - theme: Fix invisible borders for maximized windows
theme: Fix invisible borders for maximized windows
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-22 18:57 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2011-10-17 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
theme: Fix invisible borders for maximized windows (3.35 KB, patch)
2011-09-22 18:57 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
theme: Don't add invisible borders for windows that can't resize (3.26 KB, patch)
2011-09-29 19:56 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
Update window->has_resize_func at the right time when unfullscreening (1.40 KB, patch)
2011-10-17 18:59 UTC, Owen Taylor
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2011-09-22 18:57:44 UTC
I'm a dumb person and mixed up "MAXIMIZED" and "FULLSCREEN".
Comment 1 Jasper St. Pierre (not reading bugmail) 2011-09-22 18:57:46 UTC
Created attachment 197280 [details] [review]
theme: Fix invisible borders for maximized windows
Comment 2 Florian Müllner 2011-09-29 19:45:05 UTC
Review of attachment 197280 [details] [review]:

See comment below:

::: src/ui/theme.c
@@ +429,3 @@
   borders->visible.bottom = layout->bottom_height;
 
+  /* For a maximized window, we have visible borders, but not invisible ones. */

This is not particularly obvious to me - we don't allow resizing of maximized windows, but rather than special-casing maximized windows, I'd suggest something like:

draggable_borders = meta_prefs_get_draggable_border_width ();

if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
  {
    borders->invisible.left = ...
    borders->invisible.right = ...
  }

if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
  {
    borders->invisible.bottom = ...
    borders->invisible.top = ...
  }
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-09-29 19:56:47 UTC
Created attachment 197811 [details] [review]
theme: Don't add invisible borders for windows that can't resize

Invisible borders are all about resizing -- in the case that a window
can't resize, it makes no sense to add them.



Oh, that makes sense. I didn't know about those flags.
Comment 4 Florian Müllner 2011-09-29 20:00:26 UTC
Review of attachment 197811 [details] [review]:

Nitpick in the subject: "cannot be resized" (or "non-resizable windows") - windows can always resize, even if they are not resizable ;-)
Comment 5 Jasper St. Pierre (not reading bugmail) 2011-10-15 12:16:00 UTC
This causes some issues with apps.

Steps:

1. Open an image in eog.
2. Go into fullscreen mode with F11.
3. Exit fullscreen mode with F11.

Expected:

Standard frames

Actual:

Messed up frames, looks like we apply the cairo overlay for a layout with invisible borders on an window without room for them. Frame isn't resizable either (??)
Comment 6 Owen Taylor 2011-10-17 18:59:48 UTC
Created attachment 199252 [details] [review]
Update window->has_resize_func at the right time when unfullscreening

Since the frame windw size that meta_window_move_resize() uses depends
on whether the window has horizontal/vertical resize functionality, we
need to update this flag before we resize the window.
Comment 7 Florian Müllner 2011-10-17 19:04:47 UTC
Review of attachment 199252 [details] [review]:

Looks good (though it looks a bit fragile that we depend on order like this, but that's hardly the fault of this patch ...)
Comment 8 Owen Taylor 2011-10-17 19:11:27 UTC
Attachment 199252 [details] pushed as ba31ba4 - Update window->has_resize_func at the right time when unfullscreening