arnoldrobbins / 9menu

Simple X11 menu program for running commands
69 stars 8 forks source link

no focus? #6

Closed Framsfex closed 1 year ago

Framsfex commented 1 year ago

I am using 9menu on Ubuntu 18 with Xfce. Everyting works fine, but the 9menu window never gets the focus, so I cannot use the keyboard (UP, DOWN, ENTER), but have to use the mouse. Is it a problem with 9menu or Xfce?

Framsfex commented 1 year ago

My solution is this patch:

--- .versions/9menu.c~05~       2023-02-01 12:56:21.564941216 +0100
+++ 9menu.c     2023-02-02 11:39:38.323692747 +0100
@@ -77,7 +77,7 @@
 #include <X11/keysym.h>
 #include <X11/XKBlib.h>

-char version[] = "9menu version 1.10";
+char version[] = "9menu version 1.10f";

 Display *dpy;          /* lovely X stuff */
 int screen;
@@ -728,7 +728,7 @@
                                           nine_menu_height);

        wmhints->icon_pixmap = iconpixmap;
-       wmhints->input = False;         /* no keyboard input */
+       wmhints->input = True;          /* allow keyboard input */
        if (iconic)
                wmhints->initial_state = IconicState;
        else

Now 9menu gets the focus (keyboard input).

arnoldrobbins commented 1 year ago

I will be applying this patch and pushing shortly. Thanks.