[gtk+] imcontextxim: Remove broken custom drawing code



commit c750cea4e57ed3bcb5ba7eada95d0be380aa2fe5
Author: Benjamin Otte <otte redhat com>
Date:   Fri Oct 3 15:47:51 2014 +0200

    imcontextxim: Remove broken custom drawing code
    
    Just use regular GtkWindow styling instead.

 modules/input/gtkimcontextxim.c |   32 --------------------------------
 1 files changed, 0 insertions(+), 32 deletions(-)
---
diff --git a/modules/input/gtkimcontextxim.c b/modules/input/gtkimcontextxim.c
index e2be5b0..9a152b5 100644
--- a/modules/input/gtkimcontextxim.c
+++ b/modules/input/gtkimcontextxim.c
@@ -1701,34 +1701,6 @@ status_window_get (GtkWidget *toplevel)
   return status_window;
 }
 
-/* Draw the background (normally white) and border for the status window
- */
-static gboolean
-on_status_window_draw (GtkWidget *widget,
-                       cairo_t   *cr)
-{
-  GtkStyleContext *style;
-  GdkRGBA color;
-
-  style = gtk_widget_get_style_context (widget);
-
-  gtk_style_context_get_background_color (style, 0, &color);
-  gdk_cairo_set_source_rgba (cr, &color);
-  cairo_paint (cr);
-
-  gtk_style_context_get_color (style, 0, &color);
-  gdk_cairo_set_source_rgba (cr, &color);
-  cairo_paint (cr);
-
-  cairo_rectangle (cr, 
-                   0, 0,
-                   gtk_widget_get_allocated_width (widget) - 1,
-                   gtk_widget_get_allocated_height (widget) - 1);
-  cairo_fill (cr);
-
-  return FALSE;
-}
-
 /* Creates the widgets for the status window; called when we
  * first need to show text for the status window.
  */
@@ -1742,7 +1714,6 @@ status_window_make_window (StatusWindow *status_window)
   window = status_window->window;
 
   gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
-  gtk_widget_set_app_paintable (window, TRUE);
 
   status_label = gtk_label_new ("");
   g_object_set (status_label, "margin", 1, NULL);
@@ -1750,9 +1721,6 @@ status_window_make_window (StatusWindow *status_window)
   
   gtk_container_add (GTK_CONTAINER (window), status_label);
   
-  g_signal_connect (window, "draw",
-                   G_CALLBACK (on_status_window_draw), NULL);
-  
   gtk_window_set_screen (GTK_WINDOW (status_window->window),
                         gtk_widget_get_screen (status_window->toplevel));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]