<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - GtkWindow reacts on maximize action even if it is fixed-width"
href="https://bugzilla.gnome.org/show_bug.cgi?id=757530#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - GtkWindow reacts on maximize action even if it is fixed-width"
href="https://bugzilla.gnome.org/show_bug.cgi?id=757530">bug 757530</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
<pre>(In reply to Matthias Clasen from <a href="show_bug.cgi?id=757530#c8">comment #8</a>)
<span class="quote">> Review of <span class=""><a href="attachment.cgi?id=314813&action=diff" name="attach_314813" title="[PATCH 1/3] wayland: do not maximize a window if constrained">attachment 314813</a> <a href="attachment.cgi?id=314813&action=edit" title="[PATCH 1/3] wayland: do not maximize a window if constrained">[details]</a></span> <a href='review?bug=757530&attachment=314813'>[review]</a> [review]:
>
> ::: gdk/wayland/gdkwindow-wayland.c
> @@ +2057,3 @@
> + &allowed_width,
> + &allowed_height);
> +
>
> Hmm, are you sure this can work ? Afaik, the window geometry (at least the
> window position) is largely fantasy, under wayland.</span >
Good point. Although we don't check for the positioning ourselves here, I
reckon gdk_screen_get_monitor_at_window() does for us but I haven't check if
that would actually work with a multi-monitor setup on Wayland, indeed.
<span class="quote">> And the margin you are
> using here is the large non-maximized margin, whereas an actually maximized
> window has no margin at all...</span >
Yes, the idea was to make sure the actual window content would fit the
resulting area, either by removing the margins from the window or adding them
to the expected size.
Anyhow, I added this patch for the sake of completion, it's not required to fix
this current issue, if we get <span class=""><a href="attachment.cgi?id=314814&action=diff" name="attach_314814" title="[Patch 2/3] wayland: apply maximized state only when possible">attachment 314814</a> <a href="attachment.cgi?id=314814&action=edit" title="[Patch 2/3] wayland: apply maximized state only when possible">[details]</a></span> <a href='review?bug=757530&attachment=314814'>[review]</a> and <span class=""><a href="attachment.cgi?id=314815&action=diff" name="attach_314815" title="[PATCH 3/3] window: maximize on double click only if allowed">attachment 314815</a> <a href="attachment.cgi?id=314815&action=edit" title="[PATCH 3/3] window: maximize on double click only if allowed">[details]</a></span> <a href='review?bug=757530&attachment=314815'>[review]</a> into gtk+
this is less likely to happen.
Of course, if an app calls gtk_window_maximize() on a window which is not
resizable (or not resizable enough) it will still fail on Wayland without
<span class=""><a href="attachment.cgi?id=314813&action=diff" name="attach_314813" title="[PATCH 1/3] wayland: do not maximize a window if constrained">attachment 314813</a> <a href="attachment.cgi?id=314813&action=edit" title="[PATCH 1/3] wayland: do not maximize a window if constrained">[details]</a></span> <a href='review?bug=757530&attachment=314813'>[review]</a> but it's a slightly less probable scenario (and one could
argue that the app itself sets its window constrains so if the app tries to
maximize a window while not allowing for it using constrains, it would be a bug
in the app itself).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>