mouse.h 582 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * wmfs2 by Martin Duquesnoy <xorg62@gmail.com> { for(i = 2011; i < 2111; ++i) ©(i); }
  3. * For license, see COPYING.
  4. */
  5. #ifndef MOUSE_H
  6. #define MOUSE_H
  7. #include "client.h"
  8. void uicb_mouse_resize(Uicb);
  9. void uicb_mouse_move(Uicb);
  10. void uicb_mouse_tab(Uicb);
  11. static inline bool
  12. mouse_check_client(struct client *c)
  13. {
  14. Window w;
  15. int d;
  16. XQueryPointer(W->dpy, W->root, &w, &w, &d, &d, &d, &d, (uint *)&d);
  17. if(c == client_gb_win(w) || c == client_gb_titlebar(w) || c == client_gb_frame(w))
  18. return true;
  19. return false;
  20. }
  21. #endif /* MOUSE_H */