b=814200 remove unused gtk_xtbin_set_position r=stransky
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 04 Jan 2013 12:37:02 +1300
changeset 117536 ca4a06c212f8
parent 117535 fc816bcb876c
child 117537 6bd9494f9be3
push id20560
push userktomlinson@mozilla.com
push date2013-01-04 00:46 +0000
treeherdermozilla-inbound@04578917e3d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstransky
bugs814200
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
b=814200 remove unused gtk_xtbin_set_position r=stransky
widget/gtkxtbin/gtk2xtbin.c
widget/gtkxtbin/gtk2xtbin.h
--- a/widget/gtkxtbin/gtk2xtbin.c
+++ b/widget/gtkxtbin/gtk2xtbin.c
@@ -205,18 +205,16 @@ gtk_xtbin_class_init (GtkXtBinClass *kla
 }
 
 static void
 gtk_xtbin_init (GtkXtBin *xtbin)
 {
   xtbin->xtdisplay = NULL;
   xtbin->parent_window = NULL;
   xtbin->xtwindow = 0;
-  xtbin->x = 0;
-  xtbin->y = 0;
 }
 
 static void
 gtk_xtbin_realize (GtkWidget *widget)
 {
   GtkXtBin     *xtbin;
   GtkAllocation allocation = { 0, 0, 200, 200 };
   gint  x, y, w, h, d; /* geometry of window */
@@ -312,28 +310,16 @@ gtk_xtbin_new (GdkWindow *parent_window,
    */
   gtk_widget_realize(GTK_WIDGET(xtbin));
   gdk_window_set_back_pixmap(GTK_WIDGET(xtbin)->window, NULL, FALSE);
 
   return GTK_WIDGET (xtbin);
 }
 
 void
-gtk_xtbin_set_position (GtkXtBin *xtbin,
-                        gint       x,
-                        gint       y)
-{
-  xtbin->x = x;
-  xtbin->y = y;
-
-  if (GTK_WIDGET_REALIZED (xtbin))
-    gdk_window_move (GTK_WIDGET (xtbin)->window, x, y);
-}
-
-void
 gtk_xtbin_resize (GtkWidget *widget,
                   gint       width,
                   gint       height)
 {
   Arg args[2];
   GtkXtBin *xtbin = GTK_XTBIN (widget);
   GtkAllocation allocation;
 
@@ -351,18 +337,18 @@ gtk_xtbin_resize (GtkWidget *widget,
   }
   XtSetArg(args[0], XtNheight, height);
   XtSetArg(args[1], XtNwidth,  width);
   if (xtbin->xtclient.top_widget)
     XtSetValues(xtbin->xtclient.top_widget, args, 2);
 
   /* we need to send a size allocate so the socket knows about the
      size changes */
-  allocation.x = xtbin->x;
-  allocation.y = xtbin->y;
+  allocation.x = 0;
+  allocation.y = 0;
   allocation.width = xtbin->width;
   allocation.height = xtbin->height;
 
   gtk_widget_size_allocate(widget, &allocation);
 }
 
 static void
 gtk_xtbin_unrealize (GtkWidget *object)
--- a/widget/gtkxtbin/gtk2xtbin.h
+++ b/widget/gtkxtbin/gtk2xtbin.h
@@ -53,31 +53,27 @@ struct _XtClient {
 
 struct _GtkXtBin
 {
   GtkSocket      gsocket;
   GdkWindow     *parent_window;
   Display       *xtdisplay;        /* Xt Toolkit Display */
 
   Window         xtwindow;         /* Xt Toolkit XWindow */
-  gint           x, y;
   gint           width, height;
   XtClient	 xtclient;         /* Xt Client for XEmbed */
 };
   
 struct _GtkXtBinClass
 {
   GtkSocketClass parent_class;
 };
 
 GTKXTBIN_API(GType)       gtk_xtbin_get_type (void);
 GTKXTBIN_API(GtkWidget *) gtk_xtbin_new (GdkWindow *parent_window, String *f);
-GTKXTBIN_API(void)        gtk_xtbin_set_position (GtkXtBin *xtbin,
-                                                  gint       x,
-                                                  gint       y);
 GTKXTBIN_API(void)       gtk_xtbin_resize (GtkWidget *widget,
                                            gint       width,
                                            gint       height);
 
 typedef struct _XtTMRec {
     XtTranslations  translations;       /* private to Translation Manager    */
     XtBoundActions  proc_table;         /* procedure bindings for actions    */
     struct _XtStateRec *current_state;  /* Translation Manager state ptr     */