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 657795 - Resize behaviour weird for modal dialogs
Resize behaviour weird for modal dialogs
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-31 10:15 UTC by Alexander Larsson
Modified: 2011-09-20 19:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Disable top resizing for attached modal dialogs, for real this time (2.81 KB, patch)
2011-09-01 16:47 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
Modal dialogs should have no invisible border on top (8.31 KB, patch)
2011-09-01 16:52 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
theme: Remove meta_draw_theme_by_name (4.13 KB, patch)
2011-09-14 23:07 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
theme: Attached modal dialogs should have no top border (4.95 KB, patch)
2011-09-14 23:07 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
frames: Take out accidental south resize disable of attached dialogs (840 bytes, patch)
2011-09-15 20:08 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Alexander Larsson 2011-08-31 10:15:10 UTC
Modal dialogs appear always-above their parent, with the top of the window just below the parents titlebar. However, you can still drag-resize from the top of the modal dialog to resize it. It works, only it looks very weird as the resising is done at the bottom of the dialog, while the mouse pointer moves up.
Comment 1 Owen Taylor 2011-08-31 15:26:07 UTC
Wasn't this removed in the latest mutter?

commit e4da6495d325aaba63fcc5f287292aa5d39c0e12
Author: Jasper St. Pierre <jstpierre@mecheye.net>
Date:   Tue Aug 16 01:15:33 2011 -0400

    Disable top resizing for attached modal dialogs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656619
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-09-01 16:47:26 UTC
Created attachment 195407 [details] [review]
Disable top resizing for attached modal dialogs, for real this time

Nope. I was testing with the half-sized top borders, so I actually didn't see this.

This also leaves another bug: you can't move the parent window around by its
title rect, because the modal dialog's invisible borders are in the way. We
should probably make the top invisible border be "0" for attached dialogs to
fix this.
Comment 3 Jasper St. Pierre (not reading bugmail) 2011-09-01 16:52:56 UTC
Created attachment 195408 [details] [review]
Modal dialogs should have no invisible border on top

This requires passing the type of the window to the function that calculates
the borders. Unfortunately, this isn't easy for meta_theme_draw_frame_by_name,
so just remove it entirely, as it was unused.



This is just a quick modification of the half-sized patch - I was actually
already setting it to 0 for top borders. This also fixes an issue with the
animation -- it should scale in and appear from the top of the parent's
client area.
Comment 4 Rui Matos 2011-09-14 22:45:19 UTC
Review of attachment 195407 [details] [review]:

Look good. Works as advertised.
Comment 5 Rui Matos 2011-09-14 22:47:22 UTC
Review of attachment 195408 [details] [review]:

The unused code removal could go in another patch.

Anyway, looks good to me.

::: src/ui/theme.c
@@ +444,3 @@
 
+  if (type == META_FRAME_TYPE_ATTACHED)
+    borders->invisible.top    = 0;

Odd space.
Comment 6 Jasper St. Pierre (not reading bugmail) 2011-09-14 23:07:28 UTC
Created attachment 196561 [details] [review]
theme: Remove meta_draw_theme_by_name

It was unused, and isn't really useful.
Comment 7 Jasper St. Pierre (not reading bugmail) 2011-09-14 23:07:48 UTC
Created attachment 196562 [details] [review]
theme: Attached modal dialogs should have no top border

If we do this, then there will be invisible borders around the top of attached
modal dialogs, which is unnecessary -- they can't be resized from the top
border and just interfere with the parent dialog.

This requires changing a bit of API to help identify the type of dialog.



Split out the patches and fixed up the whitespace.
Comment 8 Rui Matos 2011-09-14 23:13:39 UTC
Review of attachment 196561 [details] [review]:

Fewer code → fewer bugs, right? Looks good.
Comment 9 Rui Matos 2011-09-14 23:17:37 UTC
Review of attachment 196561 [details] [review]:

Hmm, the subject isn't right though, the function name is meta_theme_draw_frame_by_name.
Comment 10 Rui Matos 2011-09-14 23:24:41 UTC
Review of attachment 196562 [details] [review]:

How about:

theme: Attached modal dialogs don't need an invisible top border

or something else, just to be clear that this is about _invisible_ borders.

Otherwise it's OK.
Comment 11 Jasper St. Pierre (not reading bugmail) 2011-09-15 00:04:04 UTC
Attachment 195407 [details] pushed as d6b528a - Disable top resizing for attached modal dialogs, for real this time
Comment 12 Jasper St. Pierre (not reading bugmail) 2011-09-15 20:08:31 UTC
Created attachment 196672 [details] [review]
frames: Take out accidental south resize disable of attached dialogs

Whoops -- this got through review.
Comment 13 Owen Taylor 2011-09-20 19:19:21 UTC
Reopening
Comment 14 Owen Taylor 2011-09-20 19:25:51 UTC
Review of attachment 196672 [details] [review]:

Hmm, not sure how often an only-vertically-resizable attached dialog is going to come up, but good catch!
Comment 15 Jasper St. Pierre (not reading bugmail) 2011-09-20 19:31:03 UTC
Attachment 196672 [details] pushed as 00e49b3 - frames: Take out accidental south resize disable of attached dialogs