X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=include%2Fhandlers.h;h=1d5a386522bcbe229c1de411ecf7b5ceab4d5fe8;hp=839bac619278226ffa6fc8cb4531a6168056e948;hb=HEAD;hpb=3721bcb86865f9a269d1d655ff2c99e6afd3f676 diff --git a/include/handlers.h b/include/handlers.h index 839bac61..1d5a3865 100644 --- a/include/handlers.h +++ b/include/handlers.h @@ -1,22 +1,38 @@ /* - * vim:ts=8:expandtab + * vim:ts=4:sw=4:expandtab * * i3 - an improved dynamic tiling window manager + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * - * © 2009-2010 Michael Stapelberg and contributors - * - * See file LICENSE for license information. + * handlers.c: Small handlers for various events (keypresses, focus changes, + * …). * */ -#ifndef _HANDLERS_H -#define _HANDLERS_H +#pragma once + +#include #include extern int randr_base; +extern int xkb_base; +/** + * Adds the given sequence to the list of events which are ignored. + * If this ignore should only affect a specific response_type, pass + * response_type, otherwise, pass -1. + * + * Every ignored sequence number gets garbage collected after 5 seconds. + * + */ void add_ignore_event(const int sequence, const int response_type); +/** + * Checks if the given sequence is ignored and returns true if so. + * + */ +bool event_is_ignored(const int sequence, const int response_type); + /** * Takes an xcb_generic_event_t and calls the appropriate handler, based on the * event type. @@ -29,7 +45,7 @@ void handle_event(int type, xcb_generic_event_t *event); * received from X11 * */ -void property_handlers_init(); +void property_handlers_init(void); #if 0 /** @@ -49,5 +65,3 @@ int handle_window_type(void *data, xcb_connection_t *conn, uint8_t state, xcb_window_t window, xcb_atom_t atom, xcb_get_property_reply_t *property); #endif - -#endif