diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-03-04 09:39:03 -0800 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-03-12 14:56:21 -0400 |
commit | b3cabe638f91ca8a2d71768ce74b1be2dccab1c4 (patch) | |
tree | 4e9b137f8b0cbf20a15b427b1f07049ad03086a2 /gdk | |
parent | fafddde4bc4fcc807005f240346d37aab0fc5363 (diff) | |
download | gtk+-b3cabe638f91ca8a2d71768ce74b1be2dccab1c4.tar.gz |
Drop gdk_surface_set_opacity
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdksurface.c | 37 | ||||
-rw-r--r-- | gdk/gdksurface.h | 3 |
2 files changed, 0 insertions, 40 deletions
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index b9fbb928a2..02b0b7a7dd 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -2867,43 +2867,6 @@ gdk_surface_begin_move_drag (GdkSurface *surface, GDK_SURFACE_GET_CLASS (surface)->begin_move_drag (surface, device, button, x, y, timestamp); } -/** - * gdk_surface_set_opacity: - * @surface: a top-level or non-native #GdkSurface - * @opacity: opacity - * - * Set @surface to render as partially transparent, - * with opacity 0 being fully transparent and 1 fully opaque. (Values - * of the opacity parameter are clamped to the [0,1] range.) - * - * For toplevel surfaces this depends on support from the windowing system - * that may not always be there. For instance, On X11, this works only on - * X screens with a compositing manager running. On Wayland, there is no - * per-surface opacity value that the compositor would apply. Instead, use - * `gdk_surface_set_opaque_region (surface, NULL)` to tell the compositor - * that the entire surface is (potentially) non-opaque, and draw your content - * with alpha, or use gtk_widget_set_opacity() to set an overall opacity - * for your widgets. - * - * Support for non-toplevel surfaces was added in 3.8. - */ -void -gdk_surface_set_opacity (GdkSurface *surface, - gdouble opacity) -{ - if (opacity < 0) - opacity = 0; - else if (opacity > 1) - opacity = 1; - - surface->alpha = round (opacity * 255); - - if (surface->destroyed) - return; - - GDK_SURFACE_GET_CLASS (surface)->set_opacity (surface, opacity); -} - /* This function is called when the XWindow is really gone. */ void diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h index a6e1aaeb0d..2b48e2a42d 100644 --- a/gdk/gdksurface.h +++ b/gdk/gdksurface.h @@ -406,9 +406,6 @@ cairo_surface_t * GDK_AVAILABLE_IN_ALL void gdk_surface_beep (GdkSurface *surface); -GDK_AVAILABLE_IN_ALL -void gdk_surface_set_opacity (GdkSurface *surface, - gdouble opacity); GDK_AVAILABLE_IN_ALL void gdk_surface_begin_resize_drag (GdkSurface *surface, |