Can't resize Firefox 17.0 window with sawfish
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sawfish (Ubuntu) |
Fix Released
|
High
|
Colin Watson | ||
Precise |
Fix Released
|
High
|
Colin Watson | ||
Quantal |
Won't Fix
|
High
|
Colin Watson |
Bug Description
[Impact] It is impossible to resize windows of current browser versions when using the Sawfish WM. These browser versions have been delivered in stable updates, so we should fix this observable regression too.
[Test Case] Start a Sawfish session, start Firefox, and try to resize/maximize its window.
[Regression Potential] Not really sure I see any; I suppose it's worth making sure window operations continue to work sensibly in general.
Original report follows:
Starting with version 17.0 of Firefox, it is no longer possible to resize the browser window when using the Sawfish window manager. The bug also applies to Thunderbird 17.0. The maximize button is missing from the window, keyboard shortcuts to maximize are without effect, and attempts to manually resize by dragging the window border results in an extremely tiny window, about 1 pixel wide and a few tens of pixels high.
From "xwininfo -size" on the Firefox window:
-------
Normal window size hints:
Program supplied minimum size: 18 by 89
Program supplied maximum size: 1073741824 by 1073741824
-------
(1'073'741'824 = 0x40'00'00'00)
From librep-
-------
#define rep_VALUE_IS_INT 2
#define rep_VALUE_INT_SHIFT 2
[...]
/* Convert a signed integer into a repv. */
#define rep_MAKE_INT(x) (((x) << rep_VALUE_
| rep_VALUE_IS_INT)
-------
In other words, the top two bits in integers get discarded. I have a 64-bit system, but it seems 32-bit ints are used here anyway. The result is that the maximum-window-size value will be mangled and becomes 0, which obviously could cause problems.
Here is a fix which makes the maximum-window-size value use only 30 bits. 0x1f'ff'ff'ff is chosen as maximum value since that will keep the top three bits to 0. The third top-most bit has to be 0 too since the number would probably be interpreted as a negative number if it wasn't. The fix seems to work nicely - both Firefox and Thunderbird windows can now be resized again.
Patch for sawfish-
-------
--- a/src/windows.c 2009-11-12 21:02:10.000000000 +0100
+++ b/src/windows.c 2012-11-26 04:29:07.172933027 +0100
@@ -1307,9 +1307,9 @@
}
if (flags & PMaxSize)
{
- ret = Fcons (Fcons (Qmax_width, rep_MAKE_
+ ret = Fcons (Fcons (Qmax_width, rep_MAKE_
Fcons (Fcons (Qmax_height,
- rep_MAKE_
+ rep_MAKE_
}
if (flags & PResizeInc)
{
-------
My system:
Ubuntu 12.04.1 LTS
amd64
sawfish 1:1.5.3-2build1
firefox 17.0+build2-
thunderbird 17.0+build2-
Changed in sawfish (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in sawfish (Ubuntu Precise): | |
status: | New → Triaged |
Changed in sawfish (Ubuntu Quantal): | |
status: | New → Triaged |
Changed in sawfish (Ubuntu Precise): | |
importance: | Undecided → High |
Changed in sawfish (Ubuntu Quantal): | |
importance: | Undecided → High |
Changed in sawfish (Ubuntu): | |
assignee: | nobody → Colin Watson (cjwatson) |
description: | updated |
Changed in sawfish (Ubuntu): | |
status: | Triaged → In Progress |
Changed in sawfish (Ubuntu Quantal): | |
status: | Triaged → In Progress |
Changed in sawfish (Ubuntu Precise): | |
assignee: | nobody → Colin Watson (cjwatson) |
Changed in sawfish (Ubuntu Quantal): | |
assignee: | nobody → Colin Watson (cjwatson) |
Changed in sawfish (Ubuntu Precise): | |
status: | Triaged → In Progress |
The attachment "maxsize.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]