diff options
author | Dmitry Smirnov <onlyjob@member.fsf.org> | 2018-06-29 11:40:55 +1000 |
---|---|---|
committer | Dmitry Smirnov <onlyjob@member.fsf.org> | 2018-06-29 11:41:48 +1000 |
commit | 52a51d5e636b3bbc7cb2b7cd85dee8204517cd8e (patch) | |
tree | 0d816ef8880d77cd83f5ffc0a9344aead353f2d0 | |
parent | 6703e657bad438539ea08e427dac70c111986d82 (diff) |
New upstream patches to fix current problems.
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | debian/patches/55.patch | 37 | ||||
-rw-r--r-- | debian/patches/73.patch | 28 | ||||
-rw-r--r-- | debian/patches/90a.patch | 145 | ||||
-rw-r--r-- | debian/patches/90b.patch | 59 | ||||
-rw-r--r-- | debian/patches/90c.patch | 25 | ||||
-rw-r--r-- | debian/patches/series | 5 |
7 files changed, 299 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 8b77a59..1f5fa5b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,5 @@ clipit (1.4.4-0.1) UNRELEASED; urgency=medium - * BLOCKERS: - * https://github.com/CristianHenzel/ClipIt/issues/87 - * https://github.com/CristianHenzel/ClipIt/issues/92 - * Non-maintainer upload. * New upstream release [June 2018]. * Build using "--with-gtk3", "--enable-appindicator"; diff --git a/debian/patches/55.patch b/debian/patches/55.patch new file mode 100644 index 0000000..3eff28a --- /dev/null +++ b/debian/patches/55.patch @@ -0,0 +1,37 @@ +Bug-Upstream: https://github.com/CristianHenzel/ClipIt/issues/93 +Origin: https://github.com/pblaszczyk/ClipIt/commit/ea3e1c4dd53f022289dd1c4835200ce2eab8ec98 +From ea3e1c4dd53f022289dd1c4835200ce2eab8ec98 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pawe=C5=82=20B=C5=82aszczyk?= <blaszczykpb@gmail.com> +Date: Sun, 11 Dec 2016 17:35:53 +0100 +Subject: [PATCH] [GtK+3] Don't use `gdk_window_get_pointer` since 3.20. #55 + +--- + src/main.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/src/main.c ++++ b/src/main.c +@@ -124,9 +124,23 @@ + } + else + { + GdkModifierType button_state; ++#if GTK_CHECK_VERSION(3, 20, 0) ++ GdkScreen *screen = gdk_screen_get_default(); ++ if (screen) ++ { ++ GdkDisplay *display = gdk_screen_get_display(screen); ++ GdkWindow *window = gdk_screen_get_root_window(screen); ++ GdkSeat *seat = gdk_display_get_default_seat(display); ++ ++ gdk_window_get_device_position(window, gdk_seat_get_pointer(seat), NULL, ++ NULL, &button_state); ++ } ++#else + gdk_window_get_pointer(NULL, NULL, NULL, &button_state); ++#endif ++ + /* Proceed if mouse button not being held */ + if ((primary_temp != NULL) && !(button_state & GDK_BUTTON1_MASK)) + { + /* Check if primary is the same as the last entry */ diff --git a/debian/patches/73.patch b/debian/patches/73.patch new file mode 100644 index 0000000..9d1c914 --- /dev/null +++ b/debian/patches/73.patch @@ -0,0 +1,28 @@ +Bug-Upstream: https://github.com/CristianHenzel/ClipIt/pull/73 +Origin: https://github.com/CristianHenzel/ClipIt/pull/73/commits/ed1aeef059805a6925237cee327a2a3bb8127262 +From ed1aeef059805a6925237cee327a2a3bb8127262 Mon Sep 17 00:00:00 2001 +From: Simon Epskamp <simon@frontwise.com> +Date: Wed, 23 Aug 2017 21:09:44 +0200 +Subject: [PATCH] Don't write to primary clipboard unless "use primary" pref is set + +This actually fixes a bug with sublime text as well, where the +selection is lost when the primary clipboard is overwritten. +--- + src/main.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/src/main.c ++++ b/src/main.c +@@ -257,9 +257,11 @@ + history = g_list_remove_link(history, element); + history = g_list_concat(element, history); + history_item *elem_data = history->data; + gtk_clipboard_set_text(clipboard, (gchar*)elem_data->content, -1); +- gtk_clipboard_set_text(primary, (gchar*)elem_data->content, -1); ++ if (prefs.use_primary) { ++ gtk_clipboard_set_text(primary, (gchar*)elem_data->content, -1); ++ } + save_history(); + /* Paste the clipboard contents automatically if enabled */ + if (prefs.automatic_paste) { + gchar* cmd = g_strconcat("/bin/sh -c 'xdotool key ctrl+v'", NULL); diff --git a/debian/patches/90a.patch b/debian/patches/90a.patch new file mode 100644 index 0000000..af85cb1 --- /dev/null +++ b/debian/patches/90a.patch @@ -0,0 +1,145 @@ +Bug-Upstream: https://github.com/CristianHenzel/ClipIt/issues/92 +Origin: https://github.com/CristianHenzel/ClipIt/pull/90/commits/9741c39382a3f6e4c03eac6905a49794d07c465a +From 9741c39382a3f6e4c03eac6905a49794d07c465a Mon Sep 17 00:00:00 2001 +From: Ivan Malison <IvanMalison@gmail.com> +Date: Thu, 14 Jun 2018 23:48:32 -0700 +Subject: [PATCH] Fix issues with newer versions of gtk + +--- + src/main.c | 51 +++++++++++++++++++++++---------------------------- + 1 file changed, 23 insertions(+), 28 deletions(-) + +--- a/src/main.c ++++ b/src/main.c +@@ -23,8 +23,10 @@ + #ifdef HAVE_CONFIG_H + #include <config.h> + #endif + ++#define _GNU_SOURCE ++ + #include <glib.h> + #include <stdlib.h> + #include <gtk/gtk.h> + #include <X11/keysym.h> +@@ -554,17 +556,17 @@ + clear_input_buffer(); + return FALSE; + } + +- if (event->keyval == GDK_Down || event->keyval == GDK_Up) { ++ if (event->keyval == GDK_KEY_Down || event->keyval == GDK_KEY_Up) { + return FALSE; + } + + if (isprint(*event->string)) + append_to_input_buffer(event->string); + + GtkMenuShell* menu = (GtkMenuShell *) history_menu; +- GList* element = menu->children; ++ GList* element = gtk_container_get_children(menu); + GtkMenuItem *menu_item, *first_match = 0; + + const gchar* menu_label; + int count, match_count = 0; +@@ -591,71 +593,64 @@ + } + + if (first_match && match_count != prefs.items_menu) { + gtk_menu_item_select(first_match); +- menu->active_menu_item = (GtkWidget *) first_match; ++ gtk_menu_shell_select_item(menu, first_match); + return TRUE; + } + return FALSE; + } + + gboolean selected_by_digit(const GtkWidget *history_menu, const GdkEventKey *event) { ++ int selection = -1; + switch (event->keyval) { + case XK_1: + case XK_KP_1: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(0)); +- gtk_widget_destroy(history_menu); ++ selection = 1; + break; + case XK_2: + case XK_KP_2: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(1)); +- gtk_widget_destroy(history_menu); ++ selection = 2; + break; + case XK_3: + case XK_KP_3: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(2)); +- gtk_widget_destroy(history_menu); ++ selection = 3; + break; + case XK_4: + case XK_KP_4: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(3)); +- gtk_widget_destroy(history_menu); ++ selection = 4; + break; + case XK_5: + case XK_KP_5: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(4)); +- gtk_widget_destroy(history_menu); ++ selection = 5; + break; + case XK_6: + case XK_KP_6: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(5)); +- gtk_widget_destroy(history_menu); ++ selection = 6; + break; + case XK_7: + case XK_KP_7: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(6)); +- gtk_widget_destroy(history_menu); ++ selection = 7; + break; + case XK_8: + case XK_KP_8: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(7)); +- gtk_widget_destroy(history_menu); ++ selection = 8; + break; + case XK_9: + case XK_KP_9: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(8)); +- gtk_widget_destroy(history_menu); ++ selection = 9; + break; + case XK_0: + case XK_KP_0: +- item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(9)); +- gtk_widget_destroy(history_menu); ++ selection = 0; + break; +- +- default: +- return FALSE; + } +- return TRUE; ++ if (selection >= 0) { ++ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(selection)); ++ gtk_widget_destroy(history_menu); ++ return TRUE; ++ } ++ return FALSE; + } + + static void toggle_offline_mode() { + if (prefs.offline_mode) { +@@ -740,9 +735,9 @@ + if (prefs.reverse_history) + element_number--; + else + element_number++; +- element_number_small++; ++ element_number_small++; + } + /* Cleanup */ + g_free(primary_temp); + g_free(clipboard_temp); diff --git a/debian/patches/90b.patch b/debian/patches/90b.patch new file mode 100644 index 0000000..6cbb3a6 --- /dev/null +++ b/debian/patches/90b.patch @@ -0,0 +1,59 @@ +Bug-Upstream: https://github.com/CristianHenzel/ClipIt/issues/92 +Origin: https://github.com/CristianHenzel/ClipIt/pull/90/commits/45e46d03b3ff315b5b380004d85fb499b4c139db +From 45e46d03b3ff315b5b380004d85fb499b4c139db Mon Sep 17 00:00:00 2001 +From: Ivan Malison <IvanMalison@gmail.com> +Date: Mon, 25 Jun 2018 18:24:12 -0700 +Subject: [PATCH] Proceed as normal if nothing provided in stdin + +--- + src/main.c | 1 - + src/utils.c | 6 +++--- + 2 files changed, 3 insertions(+), 4 deletions(-) + +--- a/src/main.c ++++ b/src/main.c +@@ -1042,9 +1042,8 @@ + /* Exit */ + return 0; + } + g_string_free(piped_string, TRUE); +- return -1; + } + } + + /* Init ClipIt */ +--- a/src/utils.c ++++ b/src/utils.c +@@ -117,9 +117,9 @@ + */ + gboolean parse_options(int argc, char* argv[]) + { + /* Declare argument options and argument variables */ +- gboolean icon = FALSE, daemon = FALSE, ++ gboolean no_icon = FALSE, daemon = FALSE, + clipboard = FALSE, primary = FALSE, + exit = FALSE; + + GOptionEntry main_entries[] = +@@ -134,9 +134,9 @@ + { + "no-icon", 'n', + 0, + G_OPTION_ARG_NONE, +- &icon, _("Do not use status icon (Ctrl-Alt-P for menu)"), ++ &no_icon, _("Do not use status icon (Ctrl-Alt-P for menu)"), + NULL + }, + { + "clipboard", 'c', +@@ -176,9 +176,9 @@ + + /* Check which options were parseed */ + + /* Do not display icon option */ +- if (icon) ++ if (no_icon) + { + prefs.no_icon = TRUE; + } + /* Run as daemon option */ diff --git a/debian/patches/90c.patch b/debian/patches/90c.patch new file mode 100644 index 0000000..05a94bb --- /dev/null +++ b/debian/patches/90c.patch @@ -0,0 +1,25 @@ +Bug-Upstream: https://github.com/CristianHenzel/ClipIt/issues/92 +Origin: https://github.com/CristianHenzel/ClipIt/pull/90/commits/50d983514386029a1f133187902084b753458f32 +From 50d983514386029a1f133187902084b753458f32 Mon Sep 17 00:00:00 2001 +From: Ivan Malison <IvanMalison@gmail.com> +Date: Mon, 25 Jun 2018 18:31:34 -0700 +Subject: [PATCH] Remove check for mouse button state + +--- + src/main.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/src/main.c ++++ b/src/main.c +@@ -141,10 +141,9 @@ + #else + gdk_window_get_pointer(NULL, NULL, NULL, &button_state); + #endif + +- /* Proceed if mouse button not being held */ +- if ((primary_temp != NULL) && !(button_state & GDK_BUTTON1_MASK)) ++ if ((primary_temp != NULL)) + { + /* Check if primary is the same as the last entry */ + if (g_strcmp0(primary_temp, primary_text) != 0) + { diff --git a/debian/patches/series b/debian/patches/series index e69de29..54fca13 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -0,0 +1,5 @@ +55.patch +#73.patch +90a.patch +90b.patch +90c.patch |