[gimp/gimp-2-10] app: don't show context menu in compact spin scale without focus
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: don't show context menu in compact spin scale without focus
- Date: Thu, 9 Jan 2020 15:31:37 +0000 (UTC)
commit 67b0279091a76f472dbff250d1b97197c4eda06e
Author: Ell <ell_se yahoo com>
Date: Thu Jan 9 17:23:40 2020 +0200
app: don't show context menu in compact spin scale without focus
Always enter relative adjustment mode when right-clicking an
unfocused compact GimpSpinScale, instead of showing the context
menu, since it otherwise leaves little room to enter relative mode
in narrow spin scales. The context menu can still be activated for
focused spin scales.
app/widgets/gimpspinscale.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/app/widgets/gimpspinscale.c b/app/widgets/gimpspinscale.c
index 0f9b694adb..a443b411e9 100644
--- a/app/widgets/gimpspinscale.c
+++ b/app/widgets/gimpspinscale.c
@@ -596,7 +596,8 @@ gimp_spin_scale_get_target (GtkWidget *widget,
if (x >= layout_x && x < layout_x + logical.width &&
y >= layout_y && y < layout_y + logical.height &&
(! private->compact ||
- gdk_event_triggers_context_menu ((GdkEvent *) event)))
+ (gtk_widget_has_focus (widget) &&
+ gdk_event_triggers_context_menu ((GdkEvent *) event))))
{
return TARGET_NUMBER;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]