Browse Source

Remove some unused function arguments

We no longer have to follow libxcb-property's API for these function, so we can
remove arguments which we don't use anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Uli Schlachter 9 years ago
parent
commit
0262e39609
1 changed files with 10 additions and 26 deletions
  1. 10
    26
      property.c

+ 10
- 26
property.c View File

@@ -53,9 +53,7 @@
53 53
             p_delete(&reply); \
54 54
     } \
55 55
     static int \
56
-    property_handle_##funcname(void *data, \
57
-                               xcb_connection_t *connection, \
58
-                               uint8_t state, \
56
+    property_handle_##funcname(uint8_t state, \
59 57
                                xcb_window_t window, \
60 58
                                xcb_atom_t name, \
61 59
                                xcb_get_property_reply_t *reply) \
@@ -78,9 +76,7 @@ HANDLE_TEXT_PROPERTY(wm_window_role, WM_WINDOW_ROLE, client_set_role)
78 76
 
79 77
 #define HANDLE_PROPERTY(name) \
80 78
     static int \
81
-    property_handle_##name(void *data, \
82
-                           xcb_connection_t *connection, \
83
-                           uint8_t state, \
79
+    property_handle_##name(uint8_t state, \
84 80
                            xcb_window_t window, \
85 81
                            xcb_atom_t name, \
86 82
                            xcb_get_property_reply_t *reply) \
@@ -243,9 +239,7 @@ property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply)
243 239
 }
244 240
 
245 241
 static int
246
-property_handle_net_wm_strut_partial(void *data,
247
-                                     xcb_connection_t *connection,
248
-                                     uint8_t state,
242
+property_handle_net_wm_strut_partial(uint8_t state,
249 243
                                      xcb_window_t window,
250 244
                                      xcb_atom_t name,
251 245
                                      xcb_get_property_reply_t *reply)
@@ -339,17 +333,13 @@ property_update_wm_protocols(client_t *c, xcb_get_property_reply_t *reply)
339 333
 }
340 334
 
341 335
 /** The property notify event handler.
342
- * \param data currently unused.
343
- * \param connection The connection to the X server.
344 336
  * \param state currently unused
345 337
  * \param window The window to obtain update the property with.
346 338
  * \param name The protocol atom, currently unused.
347 339
  * \param reply (Optional) An existing reply.
348 340
  */
349 341
 static int
350
-property_handle_xembed_info(void *data __attribute__ ((unused)),
351
-                            xcb_connection_t *connection,
352
-                            uint8_t state,
342
+property_handle_xembed_info(uint8_t state,
353 343
                             xcb_window_t window,
354 344
                             xcb_atom_t name,
355 345
                             xcb_get_property_reply_t *reply)
@@ -357,15 +347,13 @@ property_handle_xembed_info(void *data __attribute__ ((unused)),
357 347
     xembed_window_t *emwin = xembed_getbywin(&globalconf.embedded, window);
358 348
 
359 349
     if(emwin)
360
-        xembed_property_update(connection, emwin, reply);
350
+        xembed_property_update(globalconf.connection, emwin, reply);
361 351
 
362 352
     return 0;
363 353
 }
364 354
 
365 355
 static int
366
-property_handle_xrootpmap_id(void *data __attribute__ ((unused)),
367
-                             xcb_connection_t *connection,
368
-                             uint8_t state,
356
+property_handle_xrootpmap_id(uint8_t state,
369 357
                              xcb_window_t window,
370 358
                              xcb_atom_t name,
371 359
                              xcb_get_property_reply_t *reply)
@@ -375,7 +363,7 @@ property_handle_xrootpmap_id(void *data __attribute__ ((unused)),
375 363
             (*w)->need_update = true;
376 364
     else
377 365
     {
378
-        int screen = xutil_root2screen(connection, window);
366
+        int screen = xutil_root2screen(globalconf.connection, window);
379 367
         foreach(w, globalconf.wiboxes)
380 368
             if(screen == screen_array_indexof(&globalconf.screens, (*w)->screen))
381 369
                (*w)->need_update = true;
@@ -385,9 +373,7 @@ property_handle_xrootpmap_id(void *data __attribute__ ((unused)),
385 373
 }
386 374
 
387 375
 static int
388
-property_handle_net_wm_opacity(void *data __attribute__ ((unused)),
389
-                               xcb_connection_t *connection,
390
-                               uint8_t state,
376
+property_handle_net_wm_opacity(uint8_t state,
391 377
                                xcb_window_t window,
392 378
                                xcb_atom_t name,
393 379
                                xcb_get_property_reply_t *reply)
@@ -426,9 +412,7 @@ handle_propertynotify(void *data,
426 412
                       xcb_property_notify_event_t *ev)
427 413
 {
428 414
     uint32_t length;
429
-    int (*handler)(void *data,
430
-                   xcb_connection_t *connection,
431
-                   uint8_t state,
415
+    int (*handler)(uint8_t state,
432 416
                    xcb_window_t window,
433 417
                    xcb_atom_t name,
434 418
                    xcb_get_property_reply_t *reply) = NULL;
@@ -487,7 +471,7 @@ handle_propertynotify(void *data,
487 471
         propr = xcb_get_property_reply(c, cookie, 0);
488 472
     }
489 473
 
490
-    int ret = (*handler)(NULL, c, ev->state, ev->window, ev->atom, propr);
474
+    int ret = (*handler)(ev->state, ev->window, ev->atom, propr);
491 475
 
492 476
     p_delete(&propr);
493 477
     return ret;

Loading…
Cancel
Save