$OpenBSD: patch-test_test-monitor-xcb_c,v 1.1 2009/12/25 21:36:22 phessler Exp $
--- test/test-monitor-xcb.c.orig	Fri Dec 25 14:15:50 2009
+++ test/test-monitor-xcb.c	Fri Dec 25 14:18:19 2009
@@ -36,6 +36,7 @@ monitor_event_func (SnMonitorEvent *event,
 {
   SnMonitorContext *context;
   SnStartupSequence *sequence;
+  const char *s;
 
   context = sn_monitor_event_get_context (event);
   sequence = sn_monitor_event_get_startup_sequence (event);
@@ -45,7 +46,6 @@ monitor_event_func (SnMonitorEvent *event,
     case SN_MONITOR_EVENT_INITIATED:
     case SN_MONITOR_EVENT_CHANGED:
       {
-        const char *s;
 
         if (sn_monitor_event_get_type (event) == SN_MONITOR_EVENT_INITIATED)
           {
@@ -99,6 +99,8 @@ main (int argc, char **argv)
   SnDisplay *display;
   SnMonitorContext *context;
   int screen;
+  xcb_screen_t *s;
+  const uint32_t select_input_val[] = { XCB_EVENT_MASK_PROPERTY_CHANGE };
 
   xconnection = xcb_connect (NULL, &screen);
   if (xconnection == NULL)
@@ -111,8 +113,7 @@ main (int argc, char **argv)
    * root window (but not all as INITIATE messages go to
    * all root windows)
    */
-  xcb_screen_t *s = xcb_aux_get_screen (xconnection, screen);
-  const uint32_t select_input_val[] = { XCB_EVENT_MASK_PROPERTY_CHANGE };
+  s = xcb_aux_get_screen (xconnection, screen);
   xcb_change_window_attributes (xconnection, s->root, XCB_CW_EVENT_MASK,
                                 select_input_val);
 
