[gimp] Tweak display finding logic of previous commit a bit
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Tweak display finding logic of previous commit a bit
- Date: Fri, 2 Oct 2009 19:50:58 +0000 (UTC)
commit 3d13f8d4d50e308e9550339791a9e4f833c5907f
Author: Michael Natterer <mitch gimp org>
Date: Fri Oct 2 21:50:02 2009 +0200
Tweak display finding logic of previous commit a bit
(gimp_display_new): add the new shell to the active display's image
window, not the first display's.
app/display/gimpdisplay.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/app/display/gimpdisplay.c b/app/display/gimpdisplay.c
index b36abfa..465b5a6 100644
--- a/app/display/gimpdisplay.c
+++ b/app/display/gimpdisplay.c
@@ -30,6 +30,7 @@
#include "core/gimp.h"
#include "core/gimparea.h"
#include "core/gimpcontainer.h"
+#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpprogress.h"
@@ -385,14 +386,19 @@ gimp_display_new (Gimp *gimp,
/* get an image window */
if (GIMP_GUI_CONFIG (display->config)->single_window_mode)
{
- GimpDisplay *first_display;
+ GimpDisplay *active_display;
- first_display =
- GIMP_DISPLAY (gimp_container_get_first_child (gimp->displays));
+ active_display = gimp_context_get_display (gimp_get_user_context (gimp));
- if (first_display)
+ if (! active_display)
{
- GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (first_display->shell);
+ active_display =
+ GIMP_DISPLAY (gimp_container_get_first_child (gimp->displays));
+ }
+
+ if (active_display)
+ {
+ GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (active_display->shell);
window = gimp_display_shell_get_window (shell);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]