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 765020 - Menu shows behind game board when Application Menu is turned off in GNOME Shell
Menu shows behind game board when Application Menu is turned off in GNOME Shell
Status: RESOLVED FIXED
Product: four-in-a-row
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal minor
: ---
Assigned To: four-in-a-row-maint
four-in-a-row-maint
: 750505 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-04-13 23:07 UTC by fedevx
Modified: 2017-11-02 16:25 UTC
See Also:
GNOME target: ---
GNOME version: 3.19/3.20


Attachments
Screenshot showing menu behind game's board (16.28 KB, image/png)
2016-04-13 23:07 UTC, fedevx
  Details
five-or-more screenshot (no issue) (38.85 KB, image/png)
2016-04-17 13:20 UTC, fedevx
  Details
Proposed patch (859 bytes, patch)
2017-11-02 08:52 UTC, Robert Roth
none Details | Review
Proposed patch second revision (829 bytes, patch)
2017-11-02 13:15 UTC, Robert Roth
accepted-commit_now Details | Review

Description fedevx 2016-04-13 23:07:05 UTC
Created attachment 325890 [details]
Screenshot showing menu behind game's board

Game's menu shows behind game board when GNOME's Application Menu is turned off. See screenshot for further clarifications.

Thanks!
Comment 1 Michael Catanzaro 2016-04-14 12:33:33 UTC
Looks kinda like bug #763627, which was fixed in 3.20.2. Precisely what version of GTK+ 3.20 is this?
Comment 2 Carlos Garnacho 2016-04-14 13:45:15 UTC
Is this wayland? Is the view a GtkClutterEmbed? AFAIR we can't currently raise the popover above wl_subsurfaces that are unknown to gdk, which is the case of GtkClutterEmbed.
Comment 3 Michael Catanzaro 2016-04-14 16:33:02 UTC
Erm, I assumed it was Clutter, but it's actually not, it's being drawn with Cario in https://git.gnome.org/browse/four-in-a-row/tree/src/gfx.c

So could potentially be a Four-in-a-row issue....

(In reply to Carlos Garnacho from comment #2)
> Is this wayland?

(Dunno.)
Comment 4 fedevx 2016-04-17 13:18:21 UTC
According to Pacman, this is gtk3 3.20.3-1. Not using Wayland. four-in-a-row 3.20.0-1.

I would say this is a problem with the game because the same does not happen in five-or-more 3.20.0-1. Will add attachment.

Thanks!
Comment 5 fedevx 2016-04-17 13:20:11 UTC
Created attachment 326197 [details]
five-or-more screenshot (no issue)

Here you can see how the menu works as expected in five-or-more.
Comment 6 Carlos Garnacho 2016-04-18 13:03:40 UTC
Seems to come down to the gtk_widget_set_double_buffered() call in:

https://git.gnome.org/browse/four-in-a-row/tree/src/main.c#n1163

Removing it makes the visual stacking right.
Comment 7 Robert Roth 2016-04-26 00:07:45 UTC
*** Bug 750505 has been marked as a duplicate of this bug. ***
Comment 8 Robert Roth 2017-11-02 08:52:43 UTC
Created attachment 362797 [details] [review]
Proposed patch

The patch does enable double-buffering (in spite of the comment to disable it as it is implemented inside the code) to make the popover work properly. Better have double-double-buffering than an incorrectly working menu.
Comment 9 Michael Catanzaro 2017-11-02 11:55:46 UTC
Review of attachment 362797 [details] [review]:

Oh, interesting!

This is a step in the right direction, actually, since double-buffering does not work in Wayland.

And I see four-in-a-row does not have any calls to gdk_window_begin_draw_frame() or gdk_window_end_draw_frame(), so I guess it wasn't really handling this itself anyway.

::: src/main.c
@@ +1163,2 @@
   /* We do our own double-buffering. */
+  gtk_widget_set_double_buffered (GTK_WIDGET (drawarea), TRUE);

Well the comment is stale now.

You should remove both the comment and this function call, since TRUE is the default.
Comment 10 Robert Roth 2017-11-02 13:15:03 UTC
Created attachment 362810 [details] [review]
Proposed patch second revision
Comment 11 Robert Roth 2017-11-02 16:25:02 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.