diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2017-04-02 16:25:55 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2017-05-25 16:25:59 +0200 |
commit | ee13d4462226ab792573a8a30aa24233ddbcc91a (patch) | |
tree | ccfec54bba3912fe3c0f359268196f341c86dc42 /gtk/gtkglarea.c | |
parent | bee6148399cc9c1b7c5c87692ab2192a0ee35902 (diff) | |
download | gtk+-ee13d4462226ab792573a8a30aa24233ddbcc91a.tar.gz |
gtkglarea: Remove input window
It's not necessary to receive events anymore.
Diffstat (limited to 'gtk/gtkglarea.c')
-rw-r--r-- | gtk/gtkglarea.c | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c index df380a04b6..9b9c0217ae 100644 --- a/gtk/gtkglarea.c +++ b/gtk/gtkglarea.c @@ -138,7 +138,6 @@ typedef struct { GdkGLContext *context; - GdkWindow *event_window; GError *error; gboolean have_buffers; @@ -280,17 +279,9 @@ gtk_gl_area_realize (GtkWidget *widget) { GtkGLArea *area = GTK_GL_AREA (widget); GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); - GtkAllocation allocation; GTK_WIDGET_CLASS (gtk_gl_area_parent_class)->realize (widget); - gtk_widget_get_allocation (widget, &allocation); - - priv->event_window = gdk_window_new_input (gtk_widget_get_parent_window (widget), - GDK_ALL_EVENTS_MASK, - &allocation); - gtk_widget_register_window (widget, priv->event_window); - g_clear_error (&priv->error); priv->context = NULL; g_signal_emit (area, area_signals[CREATE_CONTEXT], 0, &priv->context); @@ -581,41 +572,10 @@ gtk_gl_area_unrealize (GtkWidget *widget) g_clear_object (&priv->context); g_clear_error (&priv->error); - if (priv->event_window != NULL) - { - gtk_widget_unregister_window (widget, priv->event_window); - gdk_window_destroy (priv->event_window); - priv->event_window = NULL; - } - GTK_WIDGET_CLASS (gtk_gl_area_parent_class)->unrealize (widget); } static void -gtk_gl_area_map (GtkWidget *widget) -{ - GtkGLArea *area = GTK_GL_AREA (widget); - GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); - - if (priv->event_window != NULL) - gdk_window_show (priv->event_window); - - GTK_WIDGET_CLASS (gtk_gl_area_parent_class)->map (widget); -} - -static void -gtk_gl_area_unmap (GtkWidget *widget) -{ - GtkGLArea *area = GTK_GL_AREA (widget); - GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); - - if (priv->event_window != NULL) - gdk_window_hide (priv->event_window); - - GTK_WIDGET_CLASS (gtk_gl_area_parent_class)->unmap (widget); -} - -static void gtk_gl_area_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { @@ -625,16 +585,7 @@ gtk_gl_area_size_allocate (GtkWidget *widget, GTK_WIDGET_CLASS (gtk_gl_area_parent_class)->size_allocate (widget, allocation); if (gtk_widget_get_realized (widget)) - { - if (priv->event_window != NULL) - gdk_window_move_resize (priv->event_window, - allocation->x, - allocation->y, - allocation->width, - allocation->height); - - priv->needs_resize = TRUE; - } + priv->needs_resize = TRUE; } static void @@ -749,8 +700,6 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass) widget_class->realize = gtk_gl_area_realize; widget_class->unrealize = gtk_gl_area_unrealize; - widget_class->map = gtk_gl_area_map; - widget_class->unmap = gtk_gl_area_unmap; widget_class->size_allocate = gtk_gl_area_size_allocate; widget_class->draw = gtk_gl_area_draw; |