]> git.pld-linux.org Git - packages/dmenu.git/blobdiff - fix-crash-when-XOpenIM-returns-NULL.patch
up to 5.0
[packages/dmenu.git] / fix-crash-when-XOpenIM-returns-NULL.patch
diff --git a/fix-crash-when-XOpenIM-returns-NULL.patch b/fix-crash-when-XOpenIM-returns-NULL.patch
deleted file mode 100644 (file)
index 919035a..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-From f5036b90efd9423d805923a0bc73cd54e30e72ab Mon Sep 17 00:00:00 2001
-From: Hiltjo Posthuma <hiltjo@codemadness.org>
-Date: Tue, 12 Feb 2019 19:10:43 +0100
-Subject: [PATCH 2/5] fix crash when XOpenIM returns NULL
-
-for example when IME variables are set, but the program is not started (yet).
-
-Signed-off-by: Jan Palus <atler@pld-linux.org>
----
- 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.25.1
-
This page took 0.722786 seconds and 4 git commands to generate.