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 759905 - Popover: Invisible to events when we set transparent backgrounds
Popover: Invisible to events when we set transparent backgrounds
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Themes
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-12-27 17:17 UTC by alex diavatis
Modified: 2016-01-08 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Protect popover input shape against transparent backgrounds (1.66 KB, patch)
2015-12-27 20:04 UTC, Timm Bäder
none Details | Review
GtkPopover: Protect against transparent backgrounds (1.85 KB, patch)
2016-01-05 18:10 UTC, Timm Bäder
accepted-commit_now Details | Review

Description alex diavatis 2015-12-27 17:17:28 UTC
Reproduce:
1. Open Nautilus
2. Open Inspector
3. on CSS view set:
      popover {background: rgba(0,0,0,1.0); }
    That works fine

   Then:
     popover {background: rgba(0,0,0,0.1); }
   Color works, but we cannot interact with the controls. 
   Like Popover is losing the depth 

Expected behavior:
  Controls should work

The same if we do:
  popover.background{}
Comment 1 alex diavatis 2015-12-27 17:27:30 UTC
This also happens if we set: background:none;
So it isn't related to rgba function.
Comment 2 Timm Bäder 2015-12-27 20:04:31 UTC
Created attachment 317935 [details] [review]
Protect popover input shape against transparent backgrounds

The problem here is that we use gtk_render_background for the input shape, so just use a rounded box instead. I'm not sure how correct this version is, i.e. how the border width counts into the input shape if it does, etc. and I'd like a better commit message :)

It does fix the problem for me though, I don't have time right now to test it properly, maybe tomorrow.
Comment 3 alex diavatis 2015-12-27 23:21:59 UTC
(In reply to Timm Bäder from comment #2)
> It does fix the problem for me though, I don't have time right now to test
> it properly, maybe tomorrow.

It does fix it here too.
Thanks!
Comment 4 Timm Bäder 2015-12-28 15:12:29 UTC
Ok, looks like that patch works fine, clicking on the border closes the popover in 3.18, too.

As a side note, we are using gtk_popover_apply_tail_path in gtk_popover_fill_border_path, but clicking on the tail still closes the popover. Why does that happen?
Comment 5 Timm Bäder 2016-01-05 18:10:20 UTC
Created attachment 318271 [details] [review]
GtkPopover: Protect against transparent backgrounds

If the background is transparent, we can't use it for the input shape,
since that will be empty. Draw a box with rounded corners irectly
instead, in fully opaque black.
Comment 6 Matthias Clasen 2016-01-08 03:11:39 UTC
Review of attachment 318271 [details] [review]:

ok, lets go with it
Comment 7 Timm Bäder 2016-01-08 11:09:15 UTC
Pushed as 711ffd648ed191bad9f0a956cf05905a73a9e4bd, thanks.