From dac4e8502f57bdcecbe674bb818f078ce10aa29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sat, 10 Mar 2018 10:33:47 +0100 Subject: [dunst] Patches already included upstream --- .../dunst-1.0.0/dunst-1.0.0-fix-pause-resume.patch | 60 ---------- x11-misc/dunst-1.0.0/dunst-1.0.0-numlock.patch | 130 --------------------- x11-misc/dunst-1.0.0/fix_memory_leak_1.patch | 25 ---- x11-misc/dunst-1.0.0/fix_memory_leak_2.patch | 25 ---- x11-misc/dunst-1.0.0/net-wm-window-type.patch | 54 --------- .../dunst-1.0.0/net-wm-window-type_followup.patch | 81 ------------- 6 files changed, 375 deletions(-) delete mode 100644 x11-misc/dunst-1.0.0/dunst-1.0.0-fix-pause-resume.patch delete mode 100644 x11-misc/dunst-1.0.0/dunst-1.0.0-numlock.patch delete mode 100644 x11-misc/dunst-1.0.0/fix_memory_leak_1.patch delete mode 100644 x11-misc/dunst-1.0.0/fix_memory_leak_2.patch delete mode 100644 x11-misc/dunst-1.0.0/net-wm-window-type.patch delete mode 100644 x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch diff --git a/x11-misc/dunst-1.0.0/dunst-1.0.0-fix-pause-resume.patch b/x11-misc/dunst-1.0.0/dunst-1.0.0-fix-pause-resume.patch deleted file mode 100644 index 9955177..0000000 --- a/x11-misc/dunst-1.0.0/dunst-1.0.0-fix-pause-resume.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 04248fd49ef6769c7dc7e246fc505ad9c70afe27 Mon Sep 17 00:00:00 2001 -From: Sascha Kruse -Date: Mon, 22 Apr 2013 20:07:35 +0000 -Subject: [PATCH] fix pause/resume - -this fixes github issue #98 ---- - dunst.c | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/dunst.c b/dunst.c -index fe67f4b..534a6d2 100644 ---- a/dunst.c -+++ b/dunst.c -@@ -105,7 +105,7 @@ void update_lists() - - if (pause_display) { - while (displayed->length > 0) { -- g_queue_insert_sorted(queue, g_queue_pop_head(queue), -+ g_queue_insert_sorted(queue, g_queue_pop_head(displayed), - notification_cmp_data, NULL); - } - return; -@@ -240,16 +240,16 @@ gboolean run(void *data) - timeout_cnt--; - } - -- if (displayed->length > 0 && !xctx.visible) { -- x_win_show(); -+ if (displayed->length > 0 && !xctx.visible && !pause_display) { -+ x_win_show(); - } - -- if (displayed->length == 0 && xctx.visible) { -- x_win_hide(); -+ if (xctx.visible && (pause_display || displayed->length == 0)) { -+ x_win_hide(); - } - - if (xctx.visible) { -- x_win_draw(); -+ x_win_draw(); - } - - if (xctx.visible) { -@@ -355,9 +355,11 @@ void pause_signal_handler(int sig) - { - if (sig == SIGUSR1) { - pause_display = true; -+ wake_up(); - } - if (sig == SIGUSR2) { - pause_display = false; -+ wake_up(); - } - - signal(sig, pause_signal_handler); --- -1.8.1.5 - diff --git a/x11-misc/dunst-1.0.0/dunst-1.0.0-numlock.patch b/x11-misc/dunst-1.0.0/dunst-1.0.0-numlock.patch deleted file mode 100644 index e6b4d9a..0000000 --- a/x11-misc/dunst-1.0.0/dunst-1.0.0-numlock.patch +++ /dev/null @@ -1,130 +0,0 @@ -diff --git a/x.c b/x.c -index 2ad74d3..4248082 100644 ---- a/x.c -+++ b/x.c -@@ -458,6 +458,53 @@ static void setopacity(Window win, unsigned long opacity) - - - -+ /* -+ * Returns the modifier which is NumLock. -+ */ -+static KeySym x_numlock_mod() -+{ -+ const KeyCode nl = XKeysymToKeycode(xctx.dpy, XStringToKeysym("Num_Lock")); -+ -+ int mod; -+ KeySym sym = 0; -+ XModifierKeymap * map = XGetModifierMapping(xctx.dpy); -+ -+ for (mod = 0; mod < 8; mod++) { -+ for (int j = 0; j < map->max_keypermod; j++) { -+ if (map->modifiermap[mod*map->max_keypermod+j] == nl) { -+ switch (mod) { -+ case ShiftMapIndex: -+ sym = ShiftMask; -+ break; -+ case LockMapIndex: -+ sym = LockMask; -+ break; -+ case ControlMapIndex: -+ sym = ControlMask; -+ break; -+ case Mod1MapIndex: -+ sym = Mod1Mask; -+ break; -+ case Mod2MapIndex: -+ sym = Mod2Mask; -+ break; -+ case Mod3MapIndex: -+ sym = Mod3Mask; -+ break; -+ case Mod4MapIndex: -+ sym = Mod4Mask; -+ break; -+ case Mod5MapIndex: -+ sym = Mod5Mask; -+ break; -+ } -+ } -+ } -+ } -+ -+ XFreeModifiermap(map); -+ return sym; -+} - - /* - * Helper function to use glib's mainloop mechanic -@@ -488,6 +535,7 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback, - gpointer user_data) - { - XEvent ev; -+ unsigned int state; - while (XPending(xctx.dpy) > 0) { - XNextEvent(xctx.dpy, &ev); - switch (ev.type) { -@@ -508,10 +556,13 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback, - } - break; - case KeyPress: -+ state = ev.xkey.state; -+ /* NumLock is also encoded in the state. Remove it. */ -+ state &= ~x_numlock_mod(); - if (settings.close_ks.str - && XLookupKeysym(&ev.xkey, - 0) == settings.close_ks.sym -- && settings.close_ks.mask == ev.xkey.state) { -+ && settings.close_ks.mask == state) { - if (displayed) { - notification *n = g_queue_peek_head(displayed); - if (n) -@@ -521,19 +572,19 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback, - if (settings.history_ks.str - && XLookupKeysym(&ev.xkey, - 0) == settings.history_ks.sym -- && settings.history_ks.mask == ev.xkey.state) { -+ && settings.history_ks.mask == state) { - history_pop(); - } - if (settings.close_all_ks.str - && XLookupKeysym(&ev.xkey, - 0) == settings.close_all_ks.sym -- && settings.close_all_ks.mask == ev.xkey.state) { -+ && settings.close_all_ks.mask == state) { - move_all_to_history(); - } - if (settings.context_ks.str - && XLookupKeysym(&ev.xkey, - 0) == settings.context_ks.sym -- && settings.context_ks.mask == ev.xkey.state) { -+ && settings.context_ks.mask == state) { - context_menu(); - } - break; -@@ -926,9 +977,12 @@ int x_shortcut_grab(keyboard_shortcut * ks) - - x_shortcut_setup_error_handler(); - -- if (ks->is_valid) -+ if (ks->is_valid) { - XGrabKey(xctx.dpy, ks->code, ks->mask, root, - true, GrabModeAsync, GrabModeAsync); -+ XGrabKey(xctx.dpy, ks->code, ks->mask | x_numlock_mod() , root, -+ true, GrabModeAsync, GrabModeAsync); -+ } - - if (x_shortcut_tear_down_error_handler()) { - fprintf(stderr, "Unable to grab key \"%s\"\n", ks->str); -@@ -945,8 +999,10 @@ void x_shortcut_ungrab(keyboard_shortcut * ks) - { - Window root; - root = RootWindow(xctx.dpy, DefaultScreen(xctx.dpy)); -- if (ks->is_valid) -+ if (ks->is_valid) { - XUngrabKey(xctx.dpy, ks->code, ks->mask, root); -+ XUngrabKey(xctx.dpy, ks->code, ks->mask | x_numlock_mod(), root); -+ } - } - - /* diff --git a/x11-misc/dunst-1.0.0/fix_memory_leak_1.patch b/x11-misc/dunst-1.0.0/fix_memory_leak_1.patch deleted file mode 100644 index fad57b9..0000000 --- a/x11-misc/dunst-1.0.0/fix_memory_leak_1.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 95c67908c1539e26b8d95a9a17d420a6611163a3 Mon Sep 17 00:00:00 2001 -From: Steven Allen -Date: Mon, 12 Aug 2013 18:37:54 -0700 -Subject: [PATCH] Fix memory leak in URL scanning code - ---- - menu.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/menu.c b/menu.c -index cd3f85a..12e1ae2 100644 ---- a/menu.c -+++ b/menu.c -@@ -60,6 +60,8 @@ char *extract_urls(const char *to_match) - - urls = string_append(urls, match, "\n"); - -+ free(match); -+ - p += m.rm_eo; - } - return urls; --- -1.9.1 - diff --git a/x11-misc/dunst-1.0.0/fix_memory_leak_2.patch b/x11-misc/dunst-1.0.0/fix_memory_leak_2.patch deleted file mode 100644 index 3b7983c..0000000 --- a/x11-misc/dunst-1.0.0/fix_memory_leak_2.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9e03b5258fb2e8afe95f3bf32e911dbedb63e765 Mon Sep 17 00:00:00 2001 -From: Giuliano Schneider -Date: Wed, 5 Mar 2014 13:31:01 +0100 -Subject: [PATCH] fix memory leak in string_to_argv - ---- - utils.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/utils.c b/utils.c -index d0bbe75..1f0cce2 100644 ---- a/utils.c -+++ b/utils.c -@@ -83,6 +83,8 @@ char **string_to_argv(const char *s) - argv = realloc (argv, sizeof (char*) * (n_spaces+1)); - argv[n_spaces] = NULL; - -+ free(str); -+ - return argv; - } - --- -1.9.1 - diff --git a/x11-misc/dunst-1.0.0/net-wm-window-type.patch b/x11-misc/dunst-1.0.0/net-wm-window-type.patch deleted file mode 100644 index cfd5e8c..0000000 --- a/x11-misc/dunst-1.0.0/net-wm-window-type.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 41e5976e6da40344aa400f9011529db9c75bf769 Mon Sep 17 00:00:00 2001 -From: Sascha Kruse -Date: Tue, 16 Jul 2013 13:30:46 +0200 -Subject: [PATCH] set _NET_WM_WINDOW_TYPE (thanks lexming) - -fix #113 ---- - x.c | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/x.c b/x.c -index e149f5c..5622f30 100644 ---- a/x.c -+++ b/x.c -@@ -850,6 +850,27 @@ void x_setup(void) - x_win_setup(); - x_cairo_setup(); - x_shortcut_grab(&settings.history_ks); -+ -+} -+ -+ -+static void x_set_win_type(Window win) -+{ -+ -+ long data[2]; -+ -+ Atom net_wm_window_type = -+ XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE", false); -+ Atom net_wm_window_type_notification = -+ XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_NOTIFICATION", false); -+ Atom net_wm_window_type_utility = -+ XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_UTILITY", false); -+ -+ data[0] = net_wm_window_type_notification; -+ data[1] = net_wm_window_type_utility; -+ -+ XChangeProperty(xctx.dpy, win, net_wm_window_type, XA_ATOM, 32, -+ PropModeReplace, (unsigned char *) &data, 1L); - } - - /* -@@ -884,6 +905,8 @@ static void x_win_setup(void) - CopyFromParent, DefaultVisual(xctx.dpy, - DefaultScreen(xctx.dpy)), - CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); -+ -+ x_set_win_type(xctx.win); - settings.transparency = - settings.transparency > 100 ? 100 : settings.transparency; - setopacity(xctx.win, --- -1.8.4 - diff --git a/x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch b/x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch deleted file mode 100644 index b01eb01..0000000 --- a/x11-misc/dunst-1.0.0/net-wm-window-type_followup.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 0466d41c507352766d86f4e2e9292b68162dc6eb Mon Sep 17 00:00:00 2001 -From: Yuri D'Elia -Date: Thu, 6 Mar 2014 16:47:06 +0100 -Subject: [PATCH] Set _NET_WM_STATE_ABOVE and fix window type. - -- Fix indentation. -- Fix wrong paramenters in call to XChangeProperty -- Do not try to raise the window, set _NET_WM_STATE_ABOVE instead ---- - x.c | 36 +++++++++++++++++++----------------- - 1 file changed, 19 insertions(+), 17 deletions(-) - -diff --git a/x.c b/x.c -index a4e877f..f552f1b 100644 ---- a/x.c -+++ b/x.c -@@ -581,10 +581,6 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback, - case SelectionNotify: - if (ev.xselection.property == xctx.utf8) - break; -- case VisibilityNotify: -- if (ev.xvisibility.state != VisibilityUnobscured) -- XRaiseWindow(xctx.dpy, xctx.win); -- break; - case ButtonPress: - if (ev.xbutton.window == xctx.win) { - x_handle_click(ev); -@@ -854,23 +850,29 @@ void x_setup(void) - } - - --static void x_set_win_type(Window win) -+static void x_set_wm(Window win) - { - -- long data[2]; -+ Atom data[2]; -+ -+ /* set window type */ -+ Atom net_wm_window_type = -+ XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE", false); -+ -+ data[0] = XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_NOTIFICATION", false); -+ data[1] = XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_UTILITY", false); -+ -+ XChangeProperty(xctx.dpy, win, net_wm_window_type, XA_ATOM, 32, -+ PropModeReplace, (unsigned char *) data, 2L); - -- Atom net_wm_window_type = -- XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE", false); -- Atom net_wm_window_type_notification = -- XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_NOTIFICATION", false); -- Atom net_wm_window_type_utility = -- XInternAtom(xctx.dpy, "_NET_WM_WINDOW_TYPE_UTILITY", false); -+ /* set state above */ -+ Atom net_wm_state = -+ XInternAtom(xctx.dpy, "_NET_WM_STATE", false); - -- data[0] = net_wm_window_type_notification; -- data[1] = net_wm_window_type_utility; -+ data[0] = XInternAtom(xctx.dpy, "_NET_WM_STATE_ABOVE", false); - -- XChangeProperty(xctx.dpy, win, net_wm_window_type, XA_ATOM, 32, -- PropModeReplace, (unsigned char *) &data, 1L); -+ XChangeProperty(xctx.dpy, win, net_wm_state, XA_ATOM, 32, -+ PropModeReplace, (unsigned char *) data, 1L); - } - - /* -@@ -906,7 +908,7 @@ static void x_win_setup(void) - DefaultScreen(xctx.dpy)), - CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); - -- x_set_win_type(xctx.win); -+ x_set_wm(xctx.win); - settings.transparency = - settings.transparency > 100 ? 100 : settings.transparency; - setopacity(xctx.win, --- -1.9.1 - -- cgit v1.2.3