Properly pass the focus from the core to plug-in dialogs:
2008-03-27 Sven Neumann <sven@gimp.org> Properly pass the focus from the core to plug-in dialogs: * libgimpbase/gimpprotocol.[ch]: added a user_time member to the GimpConfig struct. Bumped the protocol version to 0x0012. * app/core/gimp-gui.[ch] * app/gui/gui-vtable.c: added gimp_get_user_time() to get the timestamp of the last user interaction. * app/plug-in/gimppluginmanager-call.c (gimp_plug_in_manager_call_run): pass the timestamp to in the GimpConfig message. * libgimp/gimp.[ch]: * libgimp/gimp.def: added method to access the timestamp as set in the config message. * libgimp/gimpui.c (gimp_ui_init): construct a fake startup ID and set the DESKTOP_STARTUP_ID environment variable. svn path=/trunk/; revision=25263
This commit is contained in:

committed by
Sven Neumann

parent
cca470e093
commit
26d1021e77
@ -50,6 +50,7 @@ gimp_gui_init (Gimp *gimp)
|
||||
gimp->gui.help = NULL;
|
||||
gimp->gui.get_program_class = NULL;
|
||||
gimp->gui.get_display_name = NULL;
|
||||
gimp->gui.get_user_time = NULL;
|
||||
gimp->gui.get_theme_dir = NULL;
|
||||
gimp->gui.display_get_by_id = NULL;
|
||||
gimp->gui.display_get_id = NULL;
|
||||
@ -226,6 +227,27 @@ gimp_get_display_name (Gimp *gimp,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_get_user_time:
|
||||
* @gimp:
|
||||
*
|
||||
* Returns the timestamp of the last user interaction. The timestamp is
|
||||
* taken from events caused by user interaction such as key presses or
|
||||
* pointer movements. See gdk_x11_display_get_user_time().
|
||||
*
|
||||
* Return value: the timestamp of the last user interaction
|
||||
*/
|
||||
guint32
|
||||
gimp_get_user_time (Gimp *gimp)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), 0);
|
||||
|
||||
if (gimp->gui.get_user_time)
|
||||
return gimp->gui.get_user_time (gimp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gimp_get_theme_dir (Gimp *gimp)
|
||||
{
|
||||
|
Reference in New Issue
Block a user