openbsd-ports/devel/startup-notification/patches/patch-test_test-launcher-xcb_c
2009-12-25 21:36:22 +00:00

52 lines
1.6 KiB
Plaintext

$OpenBSD: patch-test_test-launcher-xcb_c,v 1.1 2009/12/25 21:36:22 phessler Exp $
--- test/test-launcher-xcb.c.orig Fri Dec 25 14:21:32 2009
+++ test/test-launcher-xcb.c Fri Dec 25 14:23:10 2009
@@ -45,15 +45,16 @@ slowly_obtain_timestamp (SnDisplay *display)
xcb_connection_t *xconnection;
xcb_generic_event_t *event;
xcb_screen_t *s;
+ uint32_t attrs[] = { 1, XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY };
+ char* name;
+ xcb_property_notify_event_t *ev;
+ xcb_timestamp_t timestamp;
xconnection = sn_display_get_x_connection (display);
s = xcb_aux_get_screen(xconnection, 0);
{
- uint32_t attrs[] = { 1, XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_STRUCTURE_NOTIFY };
- char* name;
-
xwindow = xcb_generate_id (xconnection);
xcb_create_window (xconnection, XCB_COPY_FROM_PARENT, xwindow,
@@ -70,8 +71,8 @@ slowly_obtain_timestamp (SnDisplay *display)
xcb_flush (xconnection);
event = xcb_wait_for_event (xconnection);
- xcb_property_notify_event_t *ev = (xcb_property_notify_event_t *) event;
- xcb_timestamp_t timestamp = ev->time;
+ ev = (xcb_property_notify_event_t *) event;
+ timestamp = ev->time;
free (ev);
xcb_destroy_window (xconnection, xwindow);
@@ -87,6 +88,7 @@ main (int argc, char **argv)
SnLauncherContext *context;
xcb_timestamp_t timestamp;
int screen;
+ xcb_generic_event_t *xevent;
if (argc < 2)
{
@@ -131,7 +133,7 @@ main (int argc, char **argv)
while (TRUE)
{
- xcb_generic_event_t *xevent = xcb_wait_for_event (xconnection);
+ xevent = xcb_wait_for_event (xconnection);
sn_xcb_display_process_event (display, xevent);