Bug 1097592 - Don't use PR_FindFunctionSymbolAndLibrary to avoid app freeze, r=karlt

This commit is contained in:
Martin Stransky 2014-11-14 06:32:00 +01:00
parent d08a5305f4
commit a822f9a7f4
2 changed files with 2 additions and 7 deletions

View File

@ -121,6 +121,7 @@ STUB(gdk_x11_lookup_xdisplay)
STUB(gdk_x11_screen_get_xscreen)
STUB(gdk_x11_visual_get_xvisual)
STUB(gdk_x11_window_lookup_for_display)
STUB(gdk_x11_window_set_user_time)
STUB(gdk_x11_xatom_to_atom)
STUB(gtk_accel_label_new)
STUB(gtk_alignment_get_type)

View File

@ -1295,13 +1295,7 @@ SetUserTimeAndStartupIDForActivatedWindow(GtkWidget* aWindow)
}
if (sn_launchee_context_get_id_has_timestamp(ctx)) {
PRLibrary* gtkLibrary;
SetUserTimeFunc setUserTimeFunc = (SetUserTimeFunc)
PR_FindFunctionSymbolAndLibrary("gdk_x11_window_set_user_time", &gtkLibrary);
if (setUserTimeFunc) {
setUserTimeFunc(gdkWindow, sn_launchee_context_get_timestamp(ctx));
PR_UnloadLibrary(gtkLibrary);
}
gdk_x11_window_set_user_time(gdkWindow, sn_launchee_context_get_timestamp(ctx));
}
sn_launchee_context_setup_window(ctx, gdk_x11_window_get_xid(gdkWindow));