[gtk+] Deprecate GdkEventVisibility and ::visibility-notify-event
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Deprecate GdkEventVisibility and ::visibility-notify-event
- Date: Tue, 4 Mar 2014 02:39:20 +0000 (UTC)
commit 7fae042208993c5cdd414ca547059550517b163c
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Mar 3 18:31:06 2014 -0500
Deprecate GdkEventVisibility and ::visibility-notify-event
These don't really work anymore in a composited world.
Lets make it official.
https://bugzilla.gnome.org/show_bug.cgi?id=481073
gdk/gdkevents.h | 5 +++++
gtk/gtkwidget.c | 11 ++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 896e18b..e918983 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -555,6 +555,11 @@ struct _GdkEventExpose
* %GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
*
* Generated when the window visibility status has changed.
+ *
+ * Deprecated: 3.12: Modern composited windowing systems with pervasive
+ * transparency make it impossible to track the visibility of a window
+ * reliably, so this event can not be guaranteed to provide useful
+ * information.
*/
struct _GdkEventVisibility
{
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 52cf13f..f3bfd81 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3178,14 +3178,19 @@ G_GNUC_END_IGNORE_DEPRECATIONS
* @event: (type Gdk.EventVisibility): the #GdkEventVisibility which
* triggered this signal.
*
- * The ::visibility-notify-event will be emitted when the @widget's window
- * is obscured or unobscured.
+ * The ::visibility-notify-event will be emitted when the @widget's
+ * window is obscured or unobscured.
*
* To receive this signal the #GdkWindow associated to the widget needs
* to enable the #GDK_VISIBILITY_NOTIFY_MASK mask.
*
* Returns: %TRUE to stop other handlers from being invoked for the event.
* %FALSE to propagate the event further.
+ *
+ * Deprecated: 3.12: Modern composited windowing systems with pervasive
+ * transparency make it impossible to track the visibility of a window
+ * reliably, so this signal can not be guaranteed to provide useful
+ * information.
*/
widget_signals[VISIBILITY_NOTIFY_EVENT] =
g_signal_new (I_("visibility-notify-event"),
@@ -3195,7 +3200,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
_gtk_boolean_handled_accumulator, NULL,
_gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
- GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+ GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE | G_SIGNAL_DEPRECATED);
/**
* GtkWidget::window-state-event:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]