b=814200 remove unnecessary XSelectInput with XtAddEventHandler r=stransky
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 04 Jan 2013 12:37:08 +1300
changeset 117539 df9fd7cdd333
parent 117538 cffc2daf1e91
child 117540 04578917e3d5
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 unnecessary XSelectInput with XtAddEventHandler r=stransky
widget/gtkxtbin/gtk2xtbin.c
--- a/widget/gtkxtbin/gtk2xtbin.c
+++ b/widget/gtkxtbin/gtk2xtbin.c
@@ -813,41 +813,30 @@ xt_client_focus_listener( Widget w, XtPo
     default:
       break;
     } /* End of switch(event->type) */
 }
 
 static void
 xt_add_focus_listener( Widget w, XtPointer user_data)
 {
-  XWindowAttributes attr;
-  long eventmask;
   XtClient *xtclient = user_data;
-  int errorcode;
 
   trap_errors ();
-  XGetWindowAttributes(XtDisplay(w), XtWindow(w), &attr);
-  eventmask = attr.your_event_mask | SubstructureNotifyMask | ButtonReleaseMask;
-  XSelectInput(XtDisplay(w),
-               XtWindow(w), 
-               eventmask);
-
   XtAddEventHandler(w, 
                     SubstructureNotifyMask | ButtonReleaseMask, 
                     FALSE, 
                     (XtEventHandler)xt_client_focus_listener, 
                     xtclient);
   untrap_error();
 }
 
 static void
 xt_remove_focus_listener(Widget w, XtPointer user_data)
 {
-  int errorcode;
-
   trap_errors ();
   XtRemoveEventHandler(w, SubstructureNotifyMask | ButtonReleaseMask, FALSE, 
                       (XtEventHandler)xt_client_focus_listener, user_data);
 
   untrap_error();
 }
 
 static void