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 757805 - gtkwindow: CSD windows not resizable in metacity
gtkwindow: CSD windows not resizable in metacity
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-11-09 09:56 UTC by Olivier Fourdan
Modified: 2015-11-09 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS" (1.29 KB, patch)
2015-11-09 10:05 UTC, Olivier Fourdan
none Details | Review
gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS" (1.29 KB, patch)
2015-11-09 10:06 UTC, Olivier Fourdan
none Details | Review
gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS" (1.25 KB, patch)
2015-11-09 11:06 UTC, Benjamin Otte (Company)
committed Details | Review

Description Olivier Fourdan 2015-11-09 09:56:12 UTC
git commit a5b1cdd0 introduced a regression where CSD windows are not resiable with metacity.

Reason being that metacity does not support "_GTK_FRAME_EXTENTS" and therefore gtk_window_supports_client_shadow() would always return FALSE.

This explains why it works with window managers which support "_GTK_FRAME_EXTENTS" such as mutter/gnome-shell or xfwm4.

To fix this we need to revert partially commit a5b1cdd0, the part that changed:

  if (!priv->client_decorated &&
      !(gtk_window_should_use_csd (window) &&
         gtk_window_supports_client_shadow (window)))
     return;

to:

   if (!priv->client_decorated)
     return;

   if (!(gtk_window_should_use_csd (window) &&
         gtk_window_supports_client_shadow (window)))
      return;

The problem this was trying to solve actually lied elsewhere.
Comment 1 Olivier Fourdan 2015-11-09 10:05:24 UTC
Created attachment 315107 [details] [review]
gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS"
Comment 2 Olivier Fourdan 2015-11-09 10:06:33 UTC
Created attachment 315108 [details] [review]
gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS"

(Fix typo in commit message)
Comment 3 Benjamin Otte (Company) 2015-11-09 11:00:18 UTC
(In reply to Olivier Fourdan from comment #2)
> Created attachment 315108 [details] [review] [review]
> gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS"
> 
Isn't that equivalent to just deleting the whole if statement?

Because right above, we return if (!priv->client_decorated), so when your patch now checks it again, it will always be FALSE and in turn the whole if statement will always evaluate to FALSE.
Comment 4 Benjamin Otte (Company) 2015-11-09 11:02:27 UTC
Upon rereading, it seems you wanted to remove that check above?
Comment 5 Benjamin Otte (Company) 2015-11-09 11:06:55 UTC
Created attachment 315113 [details] [review]
gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS"

git commit a5b1cdd0 introduced a regression where CSD windows are not
resizable with metacity.

Reason being that metacity does not support "_GTK_FRAME_EXTENTS" and
therefore gtk_window_supports_client_shadow() would always return FALSE.

This explains why it works with window managers which support
"_GTK_FRAME_EXTENTS" such as mutter/gnome-shell or xfwm4.

Partially revert commit a5b1cdd0 to reinstate the logic in
get_shadow_width().

Bugzilla:
Comment 6 Benjamin Otte (Company) 2015-11-09 11:07:55 UTC
Can confirm that this patch works on metacity.
Comment 7 Olivier Fourdan 2015-11-09 12:43:13 UTC
(In reply to Benjamin Otte (Company) from comment #4)
> Upon rereading, it seems you wanted to remove that check above?

Yeap indeed!

It works fine on all WM I tried (mutter/metacity/xfwm4).

And it doesn't break the other fixes with gtk_window_move()/gtk_window_resize() with CSD (which were the purpose of all these changes...)
Comment 8 Benjamin Otte (Company) 2015-11-09 13:20:47 UTC
Attachment 315113 [details] pushed as 9757ea2 - gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS"
Comment 9 Alberts Muktupāvels 2015-11-09 16:03:42 UTC
(In reply to Olivier Fourdan from comment #0)
> git commit a5b1cdd0 introduced a regression where CSD windows are not
> resiable with metacity.
> 
> Reason being that metacity does not support "_GTK_FRAME_EXTENTS" and
> therefore gtk_window_supports_client_shadow() would always return FALSE.

Which metacity version did you use for testing?
Comment 10 Olivier Fourdan 2015-11-09 16:13:52 UTC
(In reply to Alberts Muktupāvels from comment #9)
> Which metacity version did you use for testing?

The one that comes with F23, i.e. metacity-3.12.0