On Tue, Nov 11, 2008 at 09:42:52PM +0100, Andre Herms wrote:
> Sorry for the long delay. I was waiting for the git head to get in a 
> consistent state without the ugly Xrecord patch (version 1).

Thanks. Please submit your patch as a git commit (git-format-patch HEAD^)
though so it can be quickly applied with your name and your commit msg.

> Attached is a cleaned up version of the Xrecord patch. Most comments have 
> been 
> included. The following two remain.
> 
> > New dependency (debian x11proto-record-dev) not listed?
> Where should it be listed?

configure needs to require recordproto.

> > background and printf... there are debug and info functions to use.
> > Goes for all instances of this construct.
> Yes, we should add some kind of debug and info functions. However, there are 
> currently no such functions available in syndaemon. Adding these should be 
> done by another patch, not this one. 

I agree. leave it as it is.

it's looking good, but enlighten me please why we need an extra data
connection for xrecord? Is that a xrecord requirement? After all, the original
connection is only used for an XGetModifierMapping call and then no longer.

@@ -333,11 +532,16 @@ main(int argc, char *argv[])
            fclose(fd);
        }
     }
-
-    setup_keyboard_mask(display, ignore_modifier_keys);
-
-    /* Run the main loop */
-    main_loop(display, idle_time, poll_delay);
-
+#ifdef HAVE_XRECORD
+    if (use_xrecord && check_xrecord(display)) {
+       record_main_loop(display, idle_time);
+    } else
+#endif /* HAVE_XRECORD */
+      {
+       setup_keyboard_mask(display, ignore_modifier_keys);
+
+       /* Run the main loop */
+       main_loop(display, idle_time, poll_delay);
+      }
     return 0;
 }

I'd prefer if we could print out a warning if we have use_xrecord set but
check_xrecord() fails. At least so in daemon mode.

Cheers,
  Peter
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to