changeset 52:f8e4c1af96d4

GetButton.c: pkgsrc patch.
author ng0@n0.is
date Fri, 03 May 2019 20:25:33 +0000
parents 7258664c0ed6
children 611811cb990b
files GetButton.c
diffstat 1 files changed, 25 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/GetButton.c	Fri May 03 20:16:10 2019 +0000
+++ b/GetButton.c	Fri May 03 20:25:33 2019 +0000
@@ -312,14 +312,15 @@
          */
         kp_event = (XKeyPressedEvent *) button_event;
 
-/*
- * We convert the key pressed event to ascii.
- */
-#if 0
-    nbytes = XLookupString(kp_event, kbd_str, STRLEN, NULL);
-#else
-        nbytes = XLookupString (kp_event, kbd_str, STRLEN, NULL, NULL);
-#endif
+        /*
+         * We convert the key pressed event to ascii.
+         */
+        nbytes = XLookupString (kp_event,
+                                kbd_str,
+                                STRLEN,
+                                (KeySym *) NULL,
+                                (XComposeStatus *) NULL);
+
         /*
          * If kbd_str is a "non-string", then don't do anything.
          */
@@ -451,7 +452,17 @@
         return (FALSE);
 }
 
-int
+void
+AskUser (Display *dpy,
+         int scr,
+         Window window,
+         int *x,
+         int *y,
+         int *width,
+         int *height,
+         XSizeHints *hints);
+
+static void
 CheckMap (Window window)
 {
         XSizeHints sizehints;
@@ -480,7 +491,8 @@
         if (x_error_occurred)
                 return;
 
-        /* if it's a transient window, we won't rubber-band
+        /*
+         * if it's a transient window, we won't rubber-band
          * note that this call always sets transient_for.
          */
         if (XGetTransientForHint (dpy, window, &transient_for))
@@ -499,9 +511,10 @@
                     (wmhints->flags & StateHint) &&
                     (wmhints->initial_state == IconicState))
                 {
-                        /* window will remain created size -- no rubberbanding
+                        /*
+                         * window will remain created size, no rubberbanding.
+                         * note that Iconify only uses its first argument.
                          */
-                        /* note that Iconify only uses its first argument */
                         Iconify (window, 0, 0, 0, 0);
                         if (wmhints)
                                 free ((char *) wmhints);