[gtk+/events-refactor: 787/1085] GdkEventTranslator: Remove gdk_event_translator_get_event_window().



commit 32838cc12c2f86faa4e96a142f0d56aea1ce24df
Author: Carlos Garnacho <carlos lanedo com>
Date:   Sun Aug 23 18:38:12 2009 +0200

    GdkEventTranslator: Remove gdk_event_translator_get_event_window().

 gdk/x11/gdkeventtranslator.c |   79 ------------------------------------------
 gdk/x11/gdkeventtranslator.h |    7 ----
 2 files changed, 0 insertions(+), 86 deletions(-)
---
diff --git a/gdk/x11/gdkeventtranslator.c b/gdk/x11/gdkeventtranslator.c
index de3dc08..d41d7c3 100644
--- a/gdk/x11/gdkeventtranslator.c
+++ b/gdk/x11/gdkeventtranslator.c
@@ -63,85 +63,6 @@ gdk_event_translator_translate (GdkEventTranslator *translator,
   return NULL;
 }
 
-static GdkWindow *
-get_gdk_window (GdkDisplay *display,
-                Window      xwindow)
-{
-  GdkWindow *window;
-
-  /* Now find out the corresponding GdkWindows */
-  window = gdk_window_lookup_for_display (display, xwindow);
-
-  /* We may receive events such as NoExpose/GraphicsExpose
-   * and ShmCompletion for pixmaps
-   */
-  if (window && !GDK_IS_WINDOW (window))
-    window = NULL;
-
-  return window;
-}
-
-GdkWindow *
-gdk_event_translator_get_event_window (GdkEventTranslator *translator,
-                                       GdkDisplay         *display,
-                                       XEvent             *xevent)
-{
-  GdkEventTranslatorIface *iface;
-  Window xwindow = None;
-
-  g_return_val_if_fail (GDK_IS_EVENT_TRANSLATOR (translator), NULL);
-
-  iface = GDK_EVENT_TRANSLATOR_GET_IFACE (translator);
-
-  if (iface->get_event_window)
-    xwindow = (iface->get_event_window) (translator, xevent);
-
-  if (xwindow == None)
-    {
-      /* Default implementation */
-      switch (xevent->type)
-	{
-	case CreateNotify:
-	  xwindow = xevent->xcreatewindow.window;
-	  break;
-	case DestroyNotify:
-	  xwindow = xevent->xdestroywindow.window;
-	  break;
-	case UnmapNotify:
-	  xwindow = xevent->xunmap.window;
-	  break;
-	case MapNotify:
-	  xwindow = xevent->xmap.window;
-	  break;
-	case MapRequest:
-	  xwindow = xevent->xmaprequest.window;
-	  break;
-	case ReparentNotify:
-	  xwindow = xevent->xreparent.window;
-	  break;
-	case ConfigureNotify:
-	  xwindow = xevent->xconfigure.window;
-	  break;
-	case ConfigureRequest:
-	  xwindow = xevent->xconfigurerequest.window;
-	  break;
-	case GravityNotify:
-	  xwindow = xevent->xgravity.window;
-	  break;
-	case CirculateNotify:
-	  xwindow = xevent->xcirculate.window;
-	  break;
-	case CirculateRequest:
-	  xwindow = xevent->xcirculaterequest.window;
-	  break;
-	default:
-	  xwindow = xevent->xany.window;
-	}
-    }
-
-  return get_gdk_window (display, xwindow);
-}
-
 GdkEventMask
 gdk_event_translator_get_handled_events (GdkEventTranslator *translator)
 {
diff --git a/gdk/x11/gdkeventtranslator.h b/gdk/x11/gdkeventtranslator.h
index d0ef324..c6d0acc 100644
--- a/gdk/x11/gdkeventtranslator.h
+++ b/gdk/x11/gdkeventtranslator.h
@@ -44,9 +44,6 @@ struct _GdkEventTranslatorIface
                                 GdkEvent           *event,
                                 XEvent             *xevent);
 
-  Window (* get_event_window)  (GdkEventTranslator *translator,
-                                XEvent             *xevent);
-
   GdkEventMask (* get_handled_events)   (GdkEventTranslator *translator);
   void         (* select_window_events) (GdkEventTranslator *translator,
                                          Window              window,
@@ -59,10 +56,6 @@ GdkEvent * gdk_event_translator_translate (GdkEventTranslator *translator,
                                            GdkDisplay         *display,
                                            XEvent             *xevent);
 
-GdkWindow * gdk_event_translator_get_event_window  (GdkEventTranslator *translator,
-                                                    GdkDisplay         *display,
-                                                    XEvent             *xevent);
-
 GdkEventMask gdk_event_translator_get_handled_events   (GdkEventTranslator *translator);
 void         gdk_event_translator_select_window_events (GdkEventTranslator *translator,
                                                         Window              window,



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