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
@ -88,6 +88,7 @@ static const gchar * gui_get_program_class (Gimp *gimp);
|
||||
static gchar * gui_get_display_name (Gimp *gimp,
|
||||
gint display_ID,
|
||||
gint *monitor_number);
|
||||
static guint32 gui_get_user_time (Gimp *gimp);
|
||||
static const gchar * gui_get_theme_dir (Gimp *gimp);
|
||||
static GimpObject * gui_get_empty_display (Gimp *gimp);
|
||||
static GimpObject * gui_display_get_by_ID (Gimp *gimp,
|
||||
@ -144,6 +145,7 @@ gui_vtable_init (Gimp *gimp)
|
||||
gimp->gui.help = gui_help;
|
||||
gimp->gui.get_program_class = gui_get_program_class;
|
||||
gimp->gui.get_display_name = gui_get_display_name;
|
||||
gimp->gui.get_user_time = gui_get_user_time;
|
||||
gimp->gui.get_theme_dir = gui_get_theme_dir;
|
||||
gimp->gui.get_empty_display = gui_get_empty_display;
|
||||
gimp->gui.display_get_by_id = gui_display_get_by_ID;
|
||||
@ -255,6 +257,15 @@ gui_get_display_name (Gimp *gimp,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static guint32
|
||||
gui_get_user_time (Gimp *gimp)
|
||||
{
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
return gdk_x11_display_get_user_time (gdk_display_get_default ());
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
gui_get_theme_dir (Gimp *gimp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user