Browse Source

Remove another argument to property handlers

Since each handler is only for one single atom, there is no point in passing the
atom that was changed to the callback.

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

+ 8
- 15
property.c View File

@@ -55,8 +55,7 @@
55 55
     } \
56 56
     static int \
57 57
     property_handle_##funcname(uint8_t state, \
58
-                               xcb_window_t window, \
59
-                               xcb_atom_t name) \
58
+                               xcb_window_t window) \
60 59
     { \
61 60
         client_t *c = client_getbywin(window); \
62 61
         if(c) \
@@ -77,8 +76,7 @@ HANDLE_TEXT_PROPERTY(wm_window_role, WM_WINDOW_ROLE, client_set_role)
77 76
 #define HANDLE_PROPERTY(name) \
78 77
     static int \
79 78
     property_handle_##name(uint8_t state, \
80
-                           xcb_window_t window, \
81
-                           xcb_atom_t name) \
79
+                           xcb_window_t window) \
82 80
     { \
83 81
         client_t *c = client_getbywin(window); \
84 82
         if(c) \
@@ -224,8 +222,7 @@ property_update_wm_class(client_t *c, xcb_get_property_cookie_t cookie)
224 222
 
225 223
 static int
226 224
 property_handle_net_wm_strut_partial(uint8_t state,
227
-                                     xcb_window_t window,
228
-                                     xcb_atom_t name)
225
+                                     xcb_window_t window)
229 226
 {
230 227
     client_t *c = client_getbywin(window);
231 228
 
@@ -313,8 +310,7 @@ property_update_wm_protocols(client_t *c, xcb_get_property_cookie_t cookie)
313 310
  */
314 311
 static int
315 312
 property_handle_xembed_info(uint8_t state,
316
-                            xcb_window_t window,
317
-                            xcb_atom_t name)
313
+                            xcb_window_t window)
318 314
 {
319 315
     xembed_window_t *emwin = xembed_getbywin(&globalconf.embedded, window);
320 316
 
@@ -334,8 +330,7 @@ property_handle_xembed_info(uint8_t state,
334 330
 
335 331
 static int
336 332
 property_handle_xrootpmap_id(uint8_t state,
337
-                             xcb_window_t window,
338
-                             xcb_atom_t name)
333
+                             xcb_window_t window)
339 334
 {
340 335
     if(globalconf.xinerama_is_active)
341 336
         foreach(w, globalconf.wiboxes)
@@ -353,8 +348,7 @@ property_handle_xrootpmap_id(uint8_t state,
353 348
 
354 349
 static int
355 350
 property_handle_net_wm_opacity(uint8_t state,
356
-                               xcb_window_t window,
357
-                               xcb_atom_t name)
351
+                               xcb_window_t window)
358 352
 {
359 353
     wibox_t *wibox = wibox_getbywin(window);
360 354
 
@@ -388,8 +382,7 @@ void
388 382
 property_handle_propertynotify(xcb_property_notify_event_t *ev)
389 383
 {
390 384
     int (*handler)(uint8_t state,
391
-                   xcb_window_t window,
392
-                   xcb_atom_t name) = NULL;
385
+                   xcb_window_t window) = NULL;
393 386
 
394 387
     /* Find the correct event handler */
395 388
 #define HANDLE(atom_, cb) \
@@ -431,7 +424,7 @@ property_handle_propertynotify(xcb_property_notify_event_t *ev)
431 424
 #undef HANDLE
432 425
 #undef END
433 426
 
434
-    (*handler)(ev->state, ev->window, ev->atom);
427
+    (*handler)(ev->state, ev->window);
435 428
 }
436 429
 
437 430
 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

Loading…
Cancel
Save