GNOME Bugzilla – Bug 657795
Resize behaviour weird for modal dialogs
Last modified: 2011-09-20 19:31:07 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.
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
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.
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.
Review of attachment 195407 [details] [review]: Look good. Works as advertised.
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.
Created attachment 196561 [details] [review] theme: Remove meta_draw_theme_by_name It was unused, and isn't really useful.
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.
Review of attachment 196561 [details] [review]: Fewer code → fewer bugs, right? Looks good.
Review of attachment 196561 [details] [review]: Hmm, the subject isn't right though, the function name is meta_theme_draw_frame_by_name.
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.
Attachment 195407 [details] pushed as d6b528a - Disable top resizing for attached modal dialogs, for real this time
Created attachment 196672 [details] [review] frames: Take out accidental south resize disable of attached dialogs Whoops -- this got through review.
Reopening
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!
Attachment 196672 [details] pushed as 00e49b3 - frames: Take out accidental south resize disable of attached dialogs