summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-05-31 12:13:51 +0200
committerPablo Barciela <[email protected]>2018-05-31 12:26:40 +0200
commit924beb5b7178adce7d45699c4f33b66638cc6723 (patch)
tree4343cfde070f7f2028536ee7f4b7c09741ea9429
parent3742ba44a1cc6d8180517576f53e4050598dbe30 (diff)
downloadpluma-924beb5b7178adce7d45699c4f33b66638cc6723.tar.bz2
pluma-924beb5b7178adce7d45699c4f33b66638cc6723.tar.xz
pluma-notebook: avoid new file with double click in vertical scrollbar
Fixes https://github.com/mate-desktop/pluma/issues/333
-rw-r--r--pluma/pluma-notebook.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pluma/pluma-notebook.c b/pluma/pluma-notebook.c
index bc5f30e9..d59003c2 100644
--- a/pluma/pluma-notebook.c
+++ b/pluma/pluma-notebook.c
@@ -650,8 +650,6 @@ button_press_cb (PlumaNotebook *notebook,
(event->type == GDK_BUTTON_PRESS) &&
(tab_clicked >= 0))
{
- leftdown = TRUE;
-
notebook->priv->x_start = event->x_root;
notebook->priv->y_start = event->y_root;
@@ -700,11 +698,13 @@ button_press_cb (PlumaNotebook *notebook,
else if (event->type == GDK_2BUTTON_PRESS)
{
if ((tab1click != gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook))) ||
- (tab_clicked >= 0) || ((tab_clicked == -1) && (!newfile)))
+ (tab_clicked >= 0) || ((tab_clicked == -1) && (!newfile)) || (!leftdown))
return TRUE;
newfile = FALSE;
}
+
+ leftdown = TRUE;
}
return FALSE;