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 659266 - Shaded windows look broken
Shaded windows look broken
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 659858 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-16 16:52 UTC by Bastien Nocera
Modified: 2011-09-22 19:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
frames: Don't add an invisible bottom border for shaded windows (1.24 KB, patch)
2011-09-17 00:28 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
theme: Don't add any bottom border to shaded windows (1.86 KB, patch)
2011-09-17 00:49 UTC, Florian Müllner
committed Details | Review

Description Bastien Nocera 2011-09-16 16:52:51 UTC
The whole bottom of the titlebar gets clipped when the window is shaded.
Comment 1 Florian Müllner 2011-09-17 00:14:43 UTC
OK, I figured it out

When resizing the frame in meta_window_move_resize_internal() it is assumed that shaded windows don't have any bottom border:

  if (window->shaded)
    new_h = borders.total.top;

However, when calculating the frame borders in meta_frame_layout_get_border(), only the visible border is forced to 0 (with the result that a "full" invisible border is added).

So we got two possibilities for fixing it:

 1) Change the above code to

    if (window->shaded)
       new_h = borders.total.top + borders.total.bottom;

 2) Also enforce an invisible bottom border of 0 for shaded windows

Any preferences? For no particular reason I slightly prefer the second one ...
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-09-17 00:28:06 UTC
Created attachment 196782 [details] [review]
frames: Don't add an invisible bottom border for shaded windows

Shaded windows shouldn't have an invisible border, and it also causes
rendering errors elsewhere.


<magcius> fmuellner, the first is the correct fix no matter what, but do invisible borders matter on shaded windows?
<magcius> fmuellner, that is, the fix could be "both"
<fmuellner> magcius: not sure i agree that with the first one being "correct"
<magcius> fmuellner, we need to take borders into account, whether they are 0 or not.
<fmuellner> magcius: i'd define shading windows as "reduce to title bar"
<fmuellner> magcius: e.g. only the top decoration
<magcius> OK.
<fmuellner> at least that's my interpretation of the mutter code
<magcius> right
Comment 3 Florian Müllner 2011-09-17 00:49:09 UTC
Created attachment 196783 [details] [review]
theme: Don't add any bottom border to shaded windows

Shaded windows are assumed to be reduced to the titlebar: the
current code enforces a visible bottom border of 0 and only takes
the size of the title bar (+ invisible top border) into account
when resizing the frame. However, we still add an invisible border
at the bottom, which is than subtracted from the title bar, resulting
in shaded windows being cut off.
Fix by forcing both visible and invisable bottom borders to 0.
Comment 4 Jasper St. Pierre (not reading bugmail) 2011-09-17 01:32:06 UTC
Review of attachment 196783 [details] [review]:

"invisable" in commit message
Comment 5 Florian Müllner 2011-09-17 01:52:28 UTC
Attachment 196783 [details] pushed as 6087a71 - theme: Don't add any bottom border to shaded windows

(In reply to comment #4)
> "invisable" in commit message

Gah. Shouldn't write commit message that late ...
Comment 6 Owen Taylor 2011-09-22 19:19:03 UTC
*** Bug 659858 has been marked as a duplicate of this bug. ***