#1725 closed defect (fixed)
Sugar main window fails to resize on randr resolution change
Reported by: | bernie | Owned by: | aa |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | |
Component: | Sugar | Version: | Unspecified |
Severity: | Unspecified | Keywords: | r+ |
Cc: | tch, scs@…, aa, sascha_silbe | Distribution/OS: | Unspecified |
Bug Status: | Resolved |
Description
How to reproduce:
- open a terminal (activity)
- xranrd --output LVDS1 --mode 800x600 (or similar)
- observe Sugar's main windows in wrong size.
We do already support RANDR for rotation, hopefully it shouldn't be too hard to support resize as well.
Motivation for this is support for plugging projectors and external screens for presentations.
Attachments (1)
Change History (11)
comment:1 Changed 13 years ago by aa
- Cc aa added
comment:2 in reply to: ↑ description Changed 13 years ago by aa
- Keywords r? added
- Owner changed from tomeu to aa
- Status changed from new to accepted
comment:3 follow-up: ↓ 4 Changed 13 years ago by sascha_silbe
- Cc sascha_silbe added
aa, thanks for working on this issue. I'm not sure your approach is the best one, though:
def screen_size_change_cb(self, screen):
# Give the system some time to change the screen resolution.
# Otherwise, when going to a higher resolution the resize may
# not be performed correctly.
sleep(1)
self.resize(screen.get_width(), screen.get_height())
Why do we get called before the resize is complete? This smells like an upstream bug.
I also don't like using a fixed timeout, especially with time.sleep(). It artificially slows down fast systems and is likely to break on slow ones under high load.
Changed 13 years ago by aa
comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 13 years ago by aa
Replying to sascha_silbe:
aa, thanks for working on this issue. I'm not sure your approach is the best one, though:
def screen_size_change_cb(self, screen):
# Give the system some time to change the screen resolution.
# Otherwise, when going to a higher resolution the resize may
# not be performed correctly.
sleep(1)
self.resize(screen.get_width(), screen.get_height())
Why do we get called before the resize is complete? This smells like an upstream bug.
I also don't like using a fixed timeout, especially with time.sleep(). It artificially slows down fast systems and is likely to break on slow ones under high load.
Sigh. Sorry Sascha, you're absolutely right, of course. This was a bug I saw when running sugar under Kwin, and not the latest version (there's also a typo, so it doesnt even run).
I updated the patch, and tested it under sugar-jhbuild and a VM running SoaS Blueberry.
Would be nice if bernie could try it with an external projector or screen.
comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 13 years ago by bernie
Replying to aa:
Would be nice if bernie could try it with an external projector or screen.
Sorry, I have no easy way to setup a test environment in the short term.
I wonder: would activities also resize correctly on a screen change?
comment:6 in reply to: ↑ 5 Changed 13 years ago by bernie
Replying to bernie:
Replying to aa:
Would be nice if bernie could try it with an external projector or screen.
Sorry, I have no easy way to setup a test environment in the short term.
Tested! Works great. Please, find a core Sugar developer to review this patch formally and commit.
I wonder: would activities also resize correctly on a screen change?
Indeed, they do. I can't be sure 'cause I was testing in Sugar 0.88 on Lucid, which seems to have plenty of problems of its own.
comment:7 Changed 13 years ago by tomeu
- Keywords r+ added; r? removed
Wonder why Metacity isn't resizing the desktop window itself. If someone has some time, would be interesting to git grep for META_WINDOW_DESKTOP in metacity and try to understand what goes on.
Andres, please ask Simon to add you to Sugar committers so you can push your own patches yourself.
comment:8 Changed 13 years ago by bernie
Is this patch committed yet?
comment:9 Changed 13 years ago by aa
- Bug Status changed from Unconfirmed to Resolved
- Milestone changed from Unspecified by Release Team to 0.90
- Resolution set to fixed
- Status changed from accepted to closed
Commited as c3f545beac96323a046ed68b0fdf6410299dfd41. Closing this ticket.
Replying to bernie:
The attached patch solves your testcase for me.