GNOME Bugzilla – Bug 641001
make hiding work better with multihead
Last modified: 2020-11-06 20:23:23 UTC
Lubos Kocman noticed while doing QE testing of gnome-panel for RHEL 6 that autohiding doesn't really work well in the face of multiple monitors. The panel just slides over into the next monitor rather than shrinking. (see https://bugzilla.redhat.com/show_bug.cgi?id=607665)
Created attachment 179693 [details] [review] toplevel: make hiding work better with multihead When the panel needs to hide (because of autohide or hide buttons) on systems with multiple monitors, it does it about as well as a 4 year old playing hide-and-go-seek. It merely jumps onto the nearest adjacent monitor, covers its hands over its eyes and hopes the user won't see where it went. This commit makes the panel shrink instead of move off the edge of the current monitor. While the toplevel shrinks, we still give the full allocation to the applets, to prevent any weird side effects that might be caused by a rapidly shrinking allocation during animations.
Review of attachment 179693 [details] [review]: ::: gnome-panel/panel-toplevel.c @@ +2916,3 @@ +{ + GdkScreen *screen; + GdkRectangle monitor_rect; I think it is better to use GtkAllocation instead of GdkRectangle, which is deprecated for gtk3 branch. In master still is ok, though.
I can reproduce the bug only when I have 'auto-hide' and one monitor is over the another one. FWIW, I found it funny, like you said: playing hide-and-go-seek.
(In reply to comment #2) > Review of attachment 179693 [details] [review]: > > ::: gnome-panel/panel-toplevel.c > @@ +2916,3 @@ > +{ > + GdkScreen *screen; > + GdkRectangle monitor_rect; > > I think it is better to use GtkAllocation instead of GdkRectangle, which is > deprecated for gtk3 branch. In master still is ok, though. GdkRectangle didn't actually get deprecated, it just got changed from an independent type to on that's compatible with cairo's rectangle type. I need to use it for it's intersect method.
Created attachment 181028 [details] [review] toplevel: make hiding work better with multihead When the panel needs to hide (because of autohide or hide buttons) on systems with multiple monitors, it does it about as well as a 4 year old playing hide-and-go-seek. It merely jumps onto the nearest adjacent monitor, covers its hands over its eyes and hopes the user won't see where it went. This commit makes the panel shrink instead of move off the edge of the current monitor. While the toplevel shrinks, we still give the full allocation to the applets, to prevent any weird side effects that might be caused by a rapidly shrinking allocation during animations. This update fixes a problem noticed by QE where the panel wasn't properly size negotiating on monitor resolution changes.
halfline: Are there plans to get your patch here in?
I'm not sure, I guess it depends on the destiny of fallback mode and review from vuntz or so.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports in Bugzilla which have not seen updates for many years. If you can still reproduce this issue in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/gnome-panel/-/issues/ Thank you for reporting this issue and we are sorry it could not be fixed.