diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2014-02-20 16:24:59 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2014-02-20 16:36:34 +0100 |
commit | eb0f86d485b0326f9e1ac7c8bf8093d71da6c92d (patch) | |
tree | 85536aea49a18d6aa9865678853b78823ce8d603 /gtk/gtkpopover.c | |
parent | 8ea40e4956747374bd7cf3ba31035d73867753bd (diff) | |
download | gtk+-eb0f86d485b0326f9e1ac7c8bf8093d71da6c92d.tar.gz |
popover: Always apply the window shape
In practice this shape is only used to outline the popover when it is
above native windows, in the most normal full-csw case the shape won't apply
visibly, so popovers will still be able to cast a shadow there.
If there are native windows below the popover, the shape will exclude the
shadow, so there are no alpha contents above the window. One worst case that
might happen is that the popover lays above patches of native/client-side
windows, so the shadow could come and go around the border. But first let's
see whether that happens often or visibly enough before adding something more
convoluted.
Diffstat (limited to 'gtk/gtkpopover.c')
-rw-r--r-- | gtk/gtkpopover.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index 8415df12c6..a309bbfec8 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -44,7 +44,6 @@ #include <gdk/gdk.h> #include <cairo-gobject.h> #include "gtkpopover.h" -#include "gtkpopoverprivate.h" #include "gtktypebuiltins.h" #include "gtkmain.h" #include "gtkwindowprivate.h" @@ -123,6 +122,7 @@ gtk_popover_init (GtkPopover *popover) gtk_widget_set_has_window (widget, TRUE); popover->priv = gtk_popover_get_instance_private (popover); popover->priv->modal = TRUE; + popover->priv->apply_shape = TRUE; } static void @@ -1815,24 +1815,6 @@ gtk_popover_get_modal (GtkPopover *popover) return popover->priv->modal; } -void -_gtk_popover_set_apply_shape (GtkPopover *popover, - gboolean apply_shape) -{ - GtkPopoverPrivate *priv = popover->priv; - - g_return_if_fail (GTK_IS_POPOVER (popover)); - - apply_shape = apply_shape != FALSE; - - if (priv->apply_shape == apply_shape) - return; - - priv->apply_shape = apply_shape; - gtk_popover_update_position (popover); - gtk_widget_queue_draw (GTK_WIDGET (popover)); -} - static void gtk_popover_tracker_remove_func (gint position, gpointer user_data) |