[gimp] Bug 567333 - Using tab to toggle docked "utility windows" does not...
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 567333 - Using tab to toggle docked "utility windows" does not...
- Date: Wed, 29 Oct 2014 22:35:47 +0000 (UTC)
commit 225a0ce27c5b878edf9f8c3f5cae15bcf474259e
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 29 23:30:45 2014 +0100
Bug 567333 - Using tab to toggle docked "utility windows" does not...
...bring focus back to GIMP image window
When showing docks in multi-window-mode, try to set the keyboard focus
back to the active display because it might have been stolen by a dock.
app/display/gimpimagewindow.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c
index 98d46d7..7783f5b 100644
--- a/app/display/gimpimagewindow.c
+++ b/app/display/gimpimagewindow.c
@@ -1720,6 +1720,30 @@ gimp_image_window_config_notify (GimpImageWindow *window,
gimp_image_window_keep_canvas_pos (window);
gtk_widget_set_visible (private->left_docks, show_docks);
gtk_widget_set_visible (private->right_docks, show_docks);
+
+ /* If docks are being shown, and we are in multi-window-mode,
+ * and this is the window of the active display, try to set
+ * the keyboard focus to this window because it might have
+ * been stolen by a dock. See bug #567333.
+ */
+ if (strcmp (pspec->name, "hide-docks") == 0 &&
+ ! config->single_window_mode &&
+ ! config->hide_docks)
+ {
+ GimpDisplayShell *shell;
+ GimpContext *user_context;
+
+ shell = gimp_image_window_get_active_shell (window);
+ user_context = gimp_get_user_context (private->gimp);
+
+ if (gimp_context_get_display (user_context) == shell->display)
+ {
+ GdkWindow *w = gtk_widget_get_window (GTK_WIDGET (window));
+
+ if (w)
+ gdk_window_focus (w, gtk_get_current_event_time ());
+ }
+ }
}
gimp_image_window_update_tabs (window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]