Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix screen resize race #732

Merged
merged 2 commits into from Jan 2, 2017
Merged

Fix screen resize race #732

merged 2 commits into from Jan 2, 2017

Conversation

quozl
Copy link
Contributor

@quozl quozl commented Nov 9, 2016

When an external monitor is connected or disconnected, about 25% of the time the Sugar shell does not resize correctly; a size-changed signal occurs but the workarea geometry has not changed.

Underlying problem is an update race in get_monitor_workarea, so the fix is to call get_monitor_geometry for obtaining the width and height, but continue to use the workarea offset for the later call to self.move().

Can be reproduced easily without an external monitor by switching display panel resolution repeatedly;

    xrandr --output eDP1 --mode 1024x768
    xrandr --output eDP1 --mode 1366x768

Part of a fix for https://bugs.sugarlabs.org/ticket/4968


Rename size changed callback. Callbacks are to be named according to the signal, or the purpose to which we put the signal. This callback was nearly named according to the signal. A similar callback is in sugar-toolkit-gtk3 and is correctly named.


Related pull request sugarlabs/sugar-toolkit-gtk3#343 can be merged in any order with this pull request; the patches are independent but solve the same problem in two different contexts.

Callbacks are to be named according to the signal, or the purpose to
which we put the signal.

This callback was nearly named according to the signal.

A similar callback is in sugar-toolkit-gtk3 and is correctly named.
When an external monitor is connected or disconnected, about 25% of the
time the Sugar shell does not resize correctly; a size-changed signal
occurs but the workarea geometry has not changed.

Underlying problem is an update race in get_monitor_workarea, so the fix
is to call get_monitor_geometry for obtaining the width and height, but
continue to use the workarea offset for the later call to self.move().

Can be reproduced easily without an external monitor by switching
display panel resolution repeatedly;

    xrandr --output eDP1 --mode 1024x768
    xrandr --output eDP1 --mode 1366x768

Part of a fix for https://bugs.sugarlabs.org/ticket/4968
@quozl
Copy link
Contributor Author

quozl commented Jan 2, 2017

Rebased to master.

@i5o i5o merged commit ee4bc0d into sugarlabs:master Jan 2, 2017
@quozl quozl deleted the 2016-314-resize branch January 2, 2017 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants