save the last timestamp received by X11 in last_timestamp

We need it for startup notifications (to generate a unique id)

Conflicts:

	include/i3.h
	src/main.c
This commit is contained in:
Michael Stapelberg
2011-10-09 20:18:38 +01:00
parent b9db72dc8a
commit d1d4f39f9e
2 changed files with 11 additions and 0 deletions

View File

@ -259,6 +259,8 @@ int handle_button_press(xcb_button_press_event_t *event) {
Con *con;
DLOG("Button %d pressed on window 0x%08x\n", event->state, event->event);
last_timestamp = event->time;
const uint32_t mod = config.floating_modifier;
bool mod_pressed = (mod != 0 && (event->state & mod) == mod);
DLOG("floating_mod = %d, detail = %d\n", mod_pressed, event->detail);