After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758901 - wayland: old window size applied sometimes
wayland: old window size applied sometimes
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-12-01 13:48 UTC by Olivier Fourdan
Modified: 2015-12-01 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Events (21.98 KB, text/plain)
2015-12-01 13:51 UTC, Olivier Fourdan
  Details
wayland: re-configure surface even if size matches (1.30 KB, patch)
2015-12-01 13:58 UTC, Olivier Fourdan
accepted-commit_now Details | Review

Description Olivier Fourdan 2015-12-01 13:48:09 UTC
Summary:

The when resizing/unmapping/mapping windows, the old (wrong) size sometimes is applied to the window.

How reproducible:

Always with Wayland backend, not reproducible with X11 backend

Steps to reproduce:

1. From gtk source directory, run ./demos/icon-browser/gtk3-icon-browser
2. Double click on "microphone-sensitivity-low"
3. Close the window
4. Double click on "microphone-sensitivity-medium"

Actual result:

The string "medium" is longer than "low" and the label is wrapped and printed outside the which is too small to hold the string.

Expected result:

The window is large enough so no wrapping occurs and the the label fits the window.
Comment 1 Olivier Fourdan 2015-12-01 13:51:23 UTC
Created attachment 316597 [details]
Events

The wrong (old) size comes from an xdg_surface_configure event, gdk does set the new size but an event from the compositor reverts it.

This looks quite similar to bug 755051 which was fixed with commit 3058c3e
Comment 2 Olivier Fourdan 2015-12-01 13:58:05 UTC
Created attachment 316598 [details] [review]
wayland: re-configure surface even if size matches

gdk-wayland backend would not re-configure a surface when its size and scale match the known size and scale.
    
But there might have a pending xdg_surface_configure() that would revert this change so we should re-configure even if the currently known size/scale match, otherwise we may end up with a wrong size after the xdg_surface_configure() is received.
Comment 3 Matthias Clasen 2015-12-01 14:26:43 UTC
Review of attachment 316598 [details] [review]:

The patch fixes the symptom for me.
Comment 4 Matthias Clasen 2015-12-01 14:27:18 UTC
Review of attachment 316598 [details] [review]:

.
Comment 5 Olivier Fourdan 2015-12-01 15:23:40 UTC
attachment 316598 [details] [review] pushed as commit f37aa41 wayland: re-configure surface even if size matches