Merge lp:~a-j-buxton/ubiquity/struts into lp:ubiquity
Status: | Rejected |
---|---|
Rejected by: | Adam Conrad |
Proposed branch: | lp:~a-j-buxton/ubiquity/struts |
Merge into: | lp:ubiquity |
Diff against target: |
12 lines (+1/-1) 1 file modified
src/panel/panel.c (+1/-1) |
To merge this branch: | bzr merge lp:~a-j-buxton/ubiquity/struts |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Installer Team | Pending | ||
Mathieu Trudel-Lapierre | Pending | ||
Review via email: mp+251173@code.launchpad.net |
Description of the change
This patch changes Ubiquity panel so that it doesn't set two overlapping struts on the top and left sides. Doing so confuses xfwm4.
This is a one line patch but it is quite difficult to explain why it is the correct thing to do. Also, while it is technically correct, it is possible the existing code is doing the wrong thing for a reason.
Background: struts are reserved areas of the display for panels etc. Struts are set using X11 atoms, _NET_WM_STRUT and _NET_WM_
_NET_WM_STRUT contains four cardinals which define the width of borders on the left, right, top and bottom edges of the screen.
_NET_WM_
Here's a diagram showing what is happening:
Basically, Ubiquity sets up the struts in a rather strange way. It creates a LEFT and a TOP strut which perfectly overlap in _NET_WM_
According to the spec, window managers MUST ignore _NET_WM_STRUT if _NET_WM_
So this patch simply prevents makes Ubiquity define the LEFT strut to be 0 and 0,0,0. That means only the TOP strut is defined. Since it isn't a partial strut, that means both atoms will now contain reasonable values.
So this is all technically correct up to now. The question is whether there is a reason why Ubiquity is setting overlapping struts this way. Checking the source history shows it has always done this since the code was first commited, so it seems unlikely to be part of a workaround, and more likely to just be an oversight.
Also note that I haven't tested this due to the complexity of replacing files on a running live install.
Unmerged revisions
- 6275. By Alistair Buxton
-
Don't set two overlapping struts.
I'm pretty certain these are similar to crazy things that I saw when I was porting ubiquity panel to run under compiz.
Specifically e.g. commit like this one: bazaar. launchpad. net/~ubuntu- installer/ ubiquity/ trunk/revision/ 5778#src/ panel/panel. c
http://
However these strut bits are there to convince gtk to draw it as a "panel" rather than a window, and i'm pretty sure this was "inspired" by gnome-panel code for struts.
Can we drop that code altogether? And just keep the set_size_request and that's it?
I know that rotation works with this code, e.g. rotating screen with accelometer resizes the panel (as can be seen on nexus 7 desktop images from some time ago, these are not published any more).