Commit graph

154 commits

Author SHA1 Message Date
David Hill
90431ef17b print the atom type instead of the response type. 2012-07-21 05:59:29 +08:00
David Hill
90e1d00d5d if 0 the select() code in the event loop.
I have no idea the purpose of it.
2012-07-21 05:59:29 +08:00
Reginald Kennedy
9721c99465 Redraw bar on exposure. 2012-07-21 05:59:29 +08:00
David Hill
9a52bb6bc2 xcb_flush before polling for events 2012-07-21 05:59:29 +08:00
Reginald Kennedy
4697517042 Make DPRINTF and DNPRINTF obey 80 col while improving readability.
Debug time is now seconds since start.
2012-07-21 05:59:29 +08:00
David Hill
409634cf4a add a timestamp to debugging messages
rename time variable to timestamp
2012-07-21 05:59:29 +08:00
Reginald Kennedy
e03f06a1a5 Remove the larger hammer in focus_win(), at least temporarily.
Add the rest of the X event types to event_handle(), commented out.

Remove an unused global variable.
2012-07-21 05:59:29 +08:00
David Hill
a809812e18 no point in setting state on an already destroyed window.
it just produces an error.

ok lordreg
2012-07-21 05:59:29 +08:00
Reginald Kennedy
59681aa346 In event_error(), show the name of the request that caused the error. 2012-07-21 05:59:29 +08:00
Reginald Kennedy
096c4218dd Use xcb_event_get_error_label() instead of doing the work manually. 2012-07-21 05:59:29 +08:00
Reginald Kennedy
9bd2ca7222 Remove redundant geteventname() since there is xcb_event_get_label(). 2012-07-21 05:59:28 +08:00
Reginald Kennedy
3139d00c86 Add Error event type to debug output.
Add event_type value to debug output.
2012-07-21 05:59:28 +08:00
Reginald Kennedy
e88b44bce4 Remove redundant defines for XCB error macros.
The XCB_EVENT_ERROR_BAD_* macros were simply removed without new ones
being added.
2012-07-21 05:59:28 +08:00
Reginald Kennedy
3228ba7d20 Fix XCB error macros to use current naming.
Add -lxcb-xtest to Linux Makefile.

Indentation of multi-line statements should be 4 spaces.

Remove EOL whitespace.
2012-07-21 05:59:28 +08:00
David Hill
7df4ccc269 initial event error handling 2012-07-21 05:59:28 +08:00
David Hill
8ef91631e3 remove some xcb_flush calls 2012-07-21 05:59:28 +08:00
David Hill
54c8d5ffa9 replace XTestFakeButtonEvent with xcb 2012-07-21 05:59:28 +08:00
Reginald Kennedy
59ce7959f9 Fix 'double keypress' issue. 2012-07-21 05:59:28 +08:00
Reginald Kennedy
dff26b17f5 Convert geteventname() to XCB.
Add basic debug output of events in the main event loop.
2012-07-21 05:59:28 +08:00
Reginald Kennedy
e5e36a7e1d Fix linux Makefile.
Some whitespace.
2012-07-21 05:59:28 +08:00
David Hill
b7a93bc433 Get rid of a bunch of leftover Xlib events. 2012-07-21 05:59:28 +08:00
Reginald Kennedy
ca6e939864 Fix segfault on search_win().
get_screen(sw->idx) was attempting to get xcb screen info from the
window index #s which would mean attempting to get a screen #2, 3, 4,
etc depending on # of windows on the screen.

Fix issue with search_win not creating windows.
The solution was to use XCB_COPY_FROM_PARENT instead of
screen->root_depth and screen->root_visual.  Turns out we dont need to
query screen information in most cases.  Seems that we still need
screen->root_depth in xcb_create_pixmap().

Clean up a few multi-line statements; openbsd styling manual dictates
that 4 spaces be used for indentation when breaking a statement to
multiple lines.

Cleanup some end of line spaces/tabs.
2012-07-21 05:59:28 +08:00
David Hill
acb9e292b9 initial stab at events. ugly. 2012-07-21 05:59:28 +08:00
David Hill
7fa017b181 convert an #if 0'd XGetWMNormalHints to XCB 2012-07-21 05:58:33 +08:00
Reginald Kennedy
8d3f2ce997 Fix bar_print() so that the background of the text matches the bar color. 2012-07-21 05:58:33 +08:00
David Hill
d633bcc7fc missed xcb_icccm_get_wm_protocols_reply_wipe define to compile on older xcb-utils 2012-07-21 05:58:33 +08:00
David Hill
a8b0f3678c Convert XGrabKey and Keycode to XCB 2012-07-21 05:58:33 +08:00
Reginald Kennedy
97f84bad2c Fix XCB ICCCM functions to use the icccm prefix.
Use get_atom_from_string() instead of xcb_atom_get_fast*() since it was
removed from XCB.

Fix configurerequest debug printf to use the new array.
2012-07-21 05:58:33 +08:00
David Hill
43e3e1fb35 make syms a global so we don't allocate and free it constantly 2012-07-21 05:58:33 +08:00
David Hill
180a954375 convert a XConfigureWindow to XCB.
Also, only set the actual masks from the event handler.
2012-07-21 05:58:33 +08:00
David Hill
d50d4826ba xcb_disconnect into restart 2012-07-21 05:58:33 +08:00
David Hill
4a4ceecce4 remove a debug statement that snuck in 2012-07-21 05:58:33 +08:00
David Hill
efd9be3bdb xcb_flush in restart 2012-07-21 05:58:33 +08:00
David Hill
c668926e6e XCloseDisplay no longer needed 2012-07-21 05:58:33 +08:00
David Hill
7f2718bf2a convert updatenumlockmask to XCB 2012-07-21 05:58:33 +08:00
David Hill
644123db12 switch one remaining XUnmapWindow to xcb. Change a few Xlib defines to XCB 2012-07-21 05:58:33 +08:00
David Hill
3a76aec109 convert a XGetWindowAttributes to XCB 2012-07-21 05:58:33 +08:00
David Hill
55953d5239 move drain_enter_notify back to Xlib events til we are ready to do everything 2012-07-21 05:58:33 +08:00
David Hill
1db0121981 turn debugging back off 2012-07-21 05:58:33 +08:00
David Hill
59e91c45a7 Convert XGetWMNormalHints to XCB. Also fix a bug masking to the wrong value (I think) 2012-07-21 05:58:33 +08:00
David Hill
43b39cfcf7 make SWM_DEBUG compile again 2012-07-21 05:58:33 +08:00
David Hill
700a30a130 check to see if there is actual data to use before proceeding 2012-07-21 05:58:33 +08:00
David Hill
99990fbed4 fix to actually check there is data to copy. 2012-07-21 05:58:32 +08:00
David Hill
1a94af33a9 XGetClassHint converted to XCB 2012-07-21 05:58:32 +08:00
David Hill
e6427c7ed9 replace XGetWindowAttributes with xcb window geometry 2012-07-21 05:58:32 +08:00
David Hill
be5998f89c convert XGetAtomName to xcb 2012-07-21 05:58:32 +08:00
David Hill
32c4a83ea6 fix use after free 2012-07-21 05:58:32 +08:00
David Hill
e50807c8ff cleanup get_iconic function 2012-07-21 05:58:32 +08:00
David Hill
b9234fcc57 convert a XGetWindowProperty to xcb 2012-07-21 05:58:32 +08:00
David Hill
9b6948f710 fix crash in get_win_name.
Only wipe the reply if the reply was successful.
2012-07-21 05:58:32 +08:00