GNOME Bugzilla – Bug 587510
Background image alignment is wrong
Last modified: 2009-12-09 02:08:11 UTC
Please describe the problem: When you change a panel's background all applets apply it too. But gnome-keyboard-applet shifts it one or two pixels down (if the panel has bottom orientation) thus producing an ugly gap on the panel. Steps to reproduce: 1. add a gnome-keyboard-applet (gswitchit) to the panel. 2. apply a background image to the panel 3. look at the keyboard applet Actual results: An image is shifted for one or two pixels down. Expected results: A background image looks identically to other applet's ones. Does this happen every time? Always. Other information:
Created attachment 137684 [details] Incorrect alignment
This is a bug in libgnomekbd where the widget for this control is not making the event box window invisible
Created attachment 145017 [details] [review] Hides visible windows for event boxes
Actually, I could not reproduce that problem. But your patch seems ok for me. Committed.
Thank you, Sergey. Offtop: can we hope to see this patch in the nearest updates of karmic?
Eugene, this patch is already released in Karmic
This patch breaks the behaviour of the indicator in case flags are used. The layout switching using mouse click does not work any more in that scenario. Yes, I know, this is undocumented feature - but still it is VERY popular among users. I will try to find come compromize. Or I will have to revert the patch.
The trouble is that I still cannot reproduce the original issue - but I can reproduce the issue with flags ignoring clicks. Eugene, could you please check? A couple of ideas - would you try setting the border width for either ebox or align to 0 explicitly? Or any other modification of the containers that would eliminate that 1-pixel border that I do not see:( I need ebox visible because otherwise clicks are ignored
Actually I can reproduce that, after some playing. For example, the panel size is 24. With the patch, i.e. with invisible ebox, I am getting the following offsets of widgets to their parents: widget parent offsetx offsety border(of the widget) --------------------------------------------------------- ebox notebook 1 1 0 align ebox 1 1 2 label align 3 3 Without the patch, i.e. with visible ebox, I see the following: widget parent offsetx offsety border(of the widget) --------------------------------------------------------- ebox notebook 1 1 0 align ebox 0 0 2 label align 2 2 That is why label is 1 pixel higher, comparing to the patched version. Anyone has ideas why is that so?? Why does visible ebox allocates 1 pixel around align - even if the border is 0?
Maybe it takes some padding from gtkrc? I found out that not every theme leads to the incorrect align, but i'm not very familiar with gtkrc format so don't know where to look at.
Actually, the answer was found in the documentation on gtk_event_box_set_visible_window: There is one unexpected issue for an invisible event box that has its window below the child. (See gtk_event_box_set_above_child().) Since the input-only window is not an ancestor window of any windows that descendent widgets of the event box create, events on these windows aren't propagated up by the windowing system, but only by GTK+. The practical effect of this is if an event isn't in the event mask for the descendant window (see gtk_widget_add_events()), it won't be received by the event box. So, once I used gtk_widget_add_events, it is working again!