Hello community, here is the log from the commit of package dmenu for openSUSE:Factory checked in at 2020-09-03 01:17:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dmenu (Old) and /work/SRC/openSUSE:Factory/.dmenu.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dmenu" Thu Sep 3 01:17:11 2020 rev:16 rq:831377 version:4.9 Changes: -------- --- /work/SRC/openSUSE:Factory/dmenu/dmenu.changes 2020-08-20 22:34:25.444138340 +0200 +++ /work/SRC/openSUSE:Factory/.dmenu.new.3399/dmenu.changes 2020-09-03 01:18:09.536558912 +0200 @@ -1,0 +2,11 @@ +Mon Aug 31 16:11:30 UTC 2020 - Dirk Mueller <[email protected]> + +- add input fixes from master branch at https://git.suckless.org/dmenu/ (bsc#1164650): + 0001-Close-when-the-embedding-window-is-destroyed.patch + 0002-fix-crash-when-XOpenIM-returns-NULL.patch + 0003-make-dmenu_path-script-executable.patch + 0004-improve-xopenim-error-message.patch + 0005-revert-IME-support.patch + 0006-Fix-memory-leaks-in-drw.patch + +------------------------------------------------------------------- New: ---- 0001-Close-when-the-embedding-window-is-destroyed.patch 0002-fix-crash-when-XOpenIM-returns-NULL.patch 0003-make-dmenu_path-script-executable.patch 0004-improve-xopenim-error-message.patch 0005-revert-IME-support.patch 0006-Fix-memory-leaks-in-drw.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dmenu.spec ++++++ --- /var/tmp/diff_new_pack.mQzI0y/_old 2020-09-03 01:18:10.192559154 +0200 +++ /var/tmp/diff_new_pack.mQzI0y/_new 2020-09-03 01:18:10.196559155 +0200 @@ -25,6 +25,13 @@ URL: https://tools.suckless.org/dmenu/ Source: http://dl.suckless.org/tools/%{name}-%{version}.tar.gz Patch0: dmenu-optflags.patch +# These patches are taken from upstream at https://git.suckless.org/dmenu/ +Patch1: 0001-Close-when-the-embedding-window-is-destroyed.patch +Patch2: 0002-fix-crash-when-XOpenIM-returns-NULL.patch +Patch3: 0003-make-dmenu_path-script-executable.patch +Patch4: 0004-improve-xopenim-error-message.patch +Patch5: 0005-revert-IME-support.patch +Patch6: 0006-Fix-memory-leaks-in-drw.patch BuildRequires: pkgconfig BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(x11) ++++++ 0001-Close-when-the-embedding-window-is-destroyed.patch ++++++ >From 153aaf88bf9bf5c6c4b118bd871f8cf1eafdcab5 Mon Sep 17 00:00:00 2001 From: Quentin Rameau <[email protected]> Date: Mon, 4 Feb 2019 00:29:26 +0100 Subject: [PATCH 1/6] Close when the embedding window is destroyed --- LICENSE | 2 +- dmenu.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 6ed8ad3..9762166 100644 --- a/LICENSE +++ b/LICENSE @@ -9,7 +9,7 @@ MIT/X Consortium License © 2009 Evan Gates <[email protected]> © 2010-2012 Connor Lane Smith <[email protected]> © 2014-2019 Hiltjo Posthuma <[email protected]> -© 2015-2018 Quentin Rameau <[email protected]> +© 2015-2019 Quentin Rameau <[email protected]> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/dmenu.c b/dmenu.c index 6b8f51b..f803149 100644 --- a/dmenu.c +++ b/dmenu.c @@ -556,6 +556,11 @@ run(void) if (XFilterEvent(&ev, None)) continue; switch(ev.type) { + case DestroyNotify: + if (ev.xdestroywindow.window != win) + break; + cleanup(); + exit(1); case Expose: if (ev.xexpose.count == 0) drw_map(drw, win, 0, 0, mw, mh); @@ -667,7 +672,7 @@ setup(void) XMapRaised(dpy, win); XSetInputFocus(dpy, win, RevertToParent, CurrentTime); if (embed) { - XSelectInput(dpy, parentwin, FocusChangeMask); + XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask); if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) { for (i = 0; i < du && dws[i] != win; ++i) XSelectInput(dpy, dws[i], FocusChangeMask); -- 2.28.0 ++++++ 0002-fix-crash-when-XOpenIM-returns-NULL.patch ++++++ >From f5036b90efd9423d805923a0bc73cd54e30e72ab Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma <[email protected]> Date: Tue, 12 Feb 2019 19:10:43 +0100 Subject: [PATCH 2/6] fix crash when XOpenIM returns NULL for example when IME variables are set, but the program is not started (yet). --- dmenu.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dmenu.c b/dmenu.c index f803149..ae56f4f 100644 --- a/dmenu.c +++ b/dmenu.c @@ -664,8 +664,17 @@ setup(void) CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); XSetClassHint(dpy, win, &ch); - /* open input methods */ - xim = XOpenIM(dpy, NULL, NULL, NULL); + + /* input methods */ + if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { + XSetLocaleModifiers("@im=local"); + if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { + XSetLocaleModifiers("@im="); + if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) + die("XOpenIM failed. Could not open input device.\n"); + } + } + xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, win, XNFocusWindow, win, NULL); -- 2.28.0 ++++++ 0003-make-dmenu_path-script-executable.patch ++++++ >From 43b0c2c3dd3e694cf674097d493ef6630efc5403 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma <[email protected]> Date: Tue, 12 Feb 2019 22:13:58 +0100 Subject: [PATCH 3/6] make dmenu_path script executable (as dmenu_run is) --- dmenu_path | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 dmenu_path diff --git a/dmenu_path b/dmenu_path old mode 100644 new mode 100755 -- 2.28.0 ++++++ 0004-improve-xopenim-error-message.patch ++++++ >From a9b1de384ae1ad30805e893af5cd6ea9b87c89da Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma <[email protected]> Date: Tue, 12 Feb 2019 22:58:35 +0100 Subject: [PATCH 4/6] improve xopenim error message die() already prints a newline. --- dmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmenu.c b/dmenu.c index ae56f4f..3bfd74d 100644 --- a/dmenu.c +++ b/dmenu.c @@ -671,7 +671,7 @@ setup(void) if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { XSetLocaleModifiers("@im="); if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) - die("XOpenIM failed. Could not open input device.\n"); + die("XOpenIM failed: could not open input device"); } } -- 2.28.0 ++++++ 0005-revert-IME-support.patch ++++++ >From db6093f6ec1bb884f7540f2512935b5254750b30 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma <[email protected]> Date: Sun, 3 Mar 2019 13:08:54 +0100 Subject: [PATCH 5/6] revert IME support dmenu will not handle IME support (st will, atleast for now). revert parts of commit 377bd37e212b1ec4c03a481245603c6560d0be22 this commit also broke input focus. --- dmenu.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/dmenu.c b/dmenu.c index 3bfd74d..65f25ce 100644 --- a/dmenu.c +++ b/dmenu.c @@ -553,7 +553,7 @@ run(void) XEvent ev; while (!XNextEvent(dpy, &ev)) { - if (XFilterEvent(&ev, None)) + if (XFilterEvent(&ev, win)) continue; switch(ev.type) { case DestroyNotify: @@ -666,20 +666,13 @@ setup(void) /* input methods */ - if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { - XSetLocaleModifiers("@im=local"); - if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) { - XSetLocaleModifiers("@im="); - if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) - die("XOpenIM failed: could not open input device"); - } - } + if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL) + die("XOpenIM failed: could not open input device"); xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, XNClientWindow, win, XNFocusWindow, win, NULL); XMapRaised(dpy, win); - XSetInputFocus(dpy, win, RevertToParent, CurrentTime); if (embed) { XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask); if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) { @@ -745,8 +738,6 @@ main(int argc, char *argv[]) if (!setlocale(LC_CTYPE, "") || !XSupportsLocale()) fputs("warning: no locale support\n", stderr); - if (!XSetLocaleModifiers("")) - fputs("warning: no locale modifiers support\n", stderr); if (!(dpy = XOpenDisplay(NULL))) die("cannot open display"); screen = DefaultScreen(dpy); -- 2.28.0 ++++++ 0006-Fix-memory-leaks-in-drw.patch ++++++ >From 9b38fda6feda68f95754d5b8932b1a69471df960 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma <[email protected]> Date: Thu, 11 Jun 2020 18:45:33 +0200 Subject: [PATCH 6/6] Fix memory leaks in drw Synced from dwm. Patch by Alex Flierl <[email protected]>, thanks. --- drw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drw.c b/drw.c index 8fd1ca4..4cdbcbe 100644 --- a/drw.c +++ b/drw.c @@ -95,6 +95,7 @@ drw_free(Drw *drw) { XFreePixmap(drw->dpy, drw->drawable); XFreeGC(drw->dpy, drw->gc); + drw_fontset_free(drw->fonts); free(drw); } -- 2.28.0
