/* XErrorHandler ph; */
/* EventHandlers eh; */
-
- free(xcb_get_input_focus_reply(c, xcb_get_input_focus_unchecked(c), NULL));
- _xcb_err = 0;
- /* ph = XSetErrorHandler((XErrorHandler) */
- /* x_output_tmp_x_err); */
+
+ if (try_shm == 2) // only needed during testing
+ {
+ free(xcb_get_input_focus_reply(c, xcb_get_input_focus_unchecked(c), NULL));
+ _xcb_err = 0;
+ /* ph = XSetErrorHandler((XErrorHandler) */
+ }
xcb_shm_attach(c,
xcbob->shm_info->shmseg,
xcbob->shm_info->shmid, 0);
- free(xcb_get_input_focus_reply(c, xcb_get_input_focus_unchecked(c), NULL));
- /* XSetErrorHandler((XErrorHandler)ph); */
+ if (try_shm == 2) // only needed during testing
+ {
+ free(xcb_get_input_focus_reply(c, xcb_get_input_focus_unchecked(c), NULL));
+ /* XSetErrorHandler((XErrorHandler)ph); */
+ }
if (!_xcb_err)
{
xcbob->bpl = xcbob->image->stride;