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 314235 - Switching resolution can cause all applets to become right stuck
Switching resolution can cause all applets to become right stuck
Status: RESOLVED DUPLICATE of bug 341441
Product: gnome-panel
Classification: Other
Component: panel
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 563646 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-23 07:59 UTC by Mark McLoughlin
Modified: 2009-09-10 15:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dont-screw-up-the-panel-on-resize.patch (791 bytes, patch)
2005-08-23 08:50 UTC, Mark McLoughlin
needs-work Details | Review

Description Mark McLoughlin 2005-08-23 07:59:10 UTC
From fedora:

  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=165748

  the order of the objects on the Gnome panel gets mixed up after switching
  from resolution 1600x1200 to resolution 1024x768 and to 1600x1200. 

  Screenshot before:

    https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=117887

  Screenshot after:

    https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=117888

  I should probably mention that in the sequence documented above, I did
  absolutely nothing, except switching resolution and do what you asked me to.
  Nothing was done to the panel while in 1024x768.



From looking at the configuration dumps attached to the bug you can see that the
config changed along the lines of:

@@ -16,11 +16,11 @@
    launcher_location = gegl-00b540bf94.desktop
    tooltip =
    use_menu_path = false
-   panel_right_stick = false
+   panel_right_stick = true
    locked = false
    menu_path = applications:/
    object_type = launcher-object
-   position = 380
+   position = 6
   /tmp/t2/objects/object_0:
    toplevel_id = panel_0
    action_type = force-quit
@@ -31,11 +31,11 @@
    launcher_location =
    tooltip =
    use_menu_path = false
-   panel_right_stick = false
+   panel_right_stick = true
    locked = false
    menu_path = applications:/
    object_type = action-applet
-   position = 538
+   position = 4
   /tmp/t2/objects/menu_bar:
    toplevel_id = top_panel
    action_type = lock

i.e. all the applets became right stuck.


Basically, what we need to ensure is that we never change an applets GConf
config unless the user explicitly moves it.

In panel-widget.c we try to do this by storing the configured position in
AppletData::pos and the actual position in AppletData::constrained_pos - so if
the resolution changes, I'd expect to see all applet's AppletData::pos remain
the same, but the AppletData::constrained_pos would reflect the actual position
on the panel.

It looks like the problem might be in panel_widget_right_stick() - when the
panel width (for horizontal panels) changes, we call this function and it
changes AppletData::constrained_pos, which will later get saved to GConf. There
shouldn't be any need for this - panel_widget_right_stick() should only change
AppletData::pos, I reckon
Comment 1 Mark McLoughlin 2005-08-23 08:50:26 UTC
Created attachment 51170 [details] [review]
dont-screw-up-the-panel-on-resize.patch

Okay, here's a patch which looks reasonable to me

I'm failing to reproduce the issue, though
Comment 2 rasz 2006-08-27 11:31:20 UTC
http://bugs.winehq.org/show_bug.cgi?id=6069

rasz@rasz-desktop:~$ xrandr -d :0 -q
 SZ:    Pixels          Physical       Refresh
*0   1024 x 768    ( 271mm x 203mm )  *85
 1    800 x 600    ( 271mm x 203mm )   85
 2    640 x 480    ( 271mm x 203mm )   85
Current rotation - normal
Current reflection - none
Rotations possible - normal
Reflections possible - none

rasz@rasz-desktop:~$ xrandr -d :0 -s 2
rasz@rasz-desktop:~$ xrandr -d :0 -s 0

the result is cropped wine window and messed up panel.


btw same bug http://bugzilla.gnome.org/show_bug.cgi?id=343506
Comment 3 Sven Arvidsson 2006-11-07 19:50:44 UTC
I have seen this quite often too, and there are several debian bugs open about this issue. See for example http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=373795
Comment 4 F. Ingelrest 2007-04-06 08:27:23 UTC
Hi,

I have the exact same problem on my laptop. I must use a lower resolution to use an external display and when I switch back to my previous resolution, all applets have been moved around in the panel. This is so irritating that I created a second account that I use only with an external display just to avoid this...

I don't know exactly how this is currently managed, but one solution may be to store the positions of applets in separated configurations, one for each used resolution. This way, I could organize my panel to fit the lower resolution, and then the previous configuration will used when switching back to the standard resolution.
Comment 5 rasz 2007-04-06 09:16:29 UTC
two years and still Status: 	UNCONFIRMED
 nice ...
Comment 6 Vincent Untz 2007-05-12 21:49:53 UTC
(In reply to comment #5)
> two years and still Status:     UNCONFIRMED
>  nice ...

There's really not a big difference between UNCONFIRMED and NEW in this bugzilla (at least, for most people). We know this is a bug. Someone just needs to sit down and fix it. It's not an easy one, though.
Comment 7 Dmitry Korzhevin 2007-10-21 13:06:57 UTC
I am confirming this bug on GNOME 2.20.1 Ubuntu 7.10 Gutsy Gibon i386
Comment 8 Jonathan Amir 2007-12-23 19:58:21 UTC
I can also confirm it with Ubuntu 7.10 with latest patches. It's running Gnome 2.20.1 and applets keep moving around when I switch to an external monitor.

Also, I think http://bugzilla.gnome.org/show_bug.cgi?id=492315 is the same.
Comment 9 Carnell Washington Jr 2008-07-18 19:32:09 UTC
I can also confirm this with Ubuntu 8.04.
Comment 10 Karel Piwko 2008-12-08 07:15:25 UTC
Same issue with openSUSE 11.0 (Gnome 2.22.1).

How to reproduce problem:
0/ Add applets to panel
1/ Run any Wine application in fullscreen mode when its resolution differs from
desktop resolution
2/ Applets (all but the leftmost one) are randomly distributed on panel, leftmost one stays in right position
Comment 11 Vincent Untz 2008-12-08 12:28:28 UTC
*** Bug 563646 has been marked as a duplicate of this bug. ***
Comment 12 Federico Mena Quintero 2009-02-27 01:32:53 UTC

*** This bug has been marked as a duplicate of 341441 ***
Comment 13 karl.hegbloom 2009-07-11 21:45:46 UTC
I have just confirmed that the attached patch does fix the problem. I had to use 'gconf-editor' to set the positions of the right-stuck applets. For each of them, I set their relative position from the right end of the panel. Now they are staying where they belong when I switch from laptop to tablet mode, and also after log-out and log-in.
Comment 14 vincenzo_ml 2009-07-12 10:47:41 UTC
Please apply that patch, it's two lines. Is the right-stick property automatically set or should it be necessarily changed by hand? It can be set with a guess: if the applet touches one of the screen edges, then it sticks on that side. If an applet touches only applets with the left (resp. right) stick property or without that property set at all, then it sticks on the same side. If it touches both or nothing, then don't set the property or default to left?