GNOME Bugzilla – Bug 757805
gtkwindow: CSD windows not resizable in metacity
Last modified: 2015-11-09 16:13:52 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.
Created attachment 315107 [details] [review] gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS"
Created attachment 315108 [details] [review] gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS" (Fix typo in commit message)
(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.
Upon rereading, it seems you wanted to remove that check above?
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:
Can confirm that this patch works on metacity.
(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...)
Attachment 315113 [details] pushed as 9757ea2 - gtkwindow: Fix resize without "_GTK_FRAME_EXTENTS"
(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?
(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