1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00
putty-source/unix/x11misc.h
Simon Tatham 36ddc57084 Ignore X11 BadMatch errors during cut buffer setup.
This is quite a pain, since it involves inventing an entire new piece
of infrastructure to install a custom Xlib error handler and give it a
queue of things to do. But it fixes a bug in which Unix pterm/PuTTY
crash out at startup if one of the root window's CUT_BUFFERn
properties contains something of a type other than STRING - in
particular, UTF8_STRING is not unheard-of.

For example, run
  xprop -root -format CUT_BUFFER3 8u -set CUT_BUFFER3 "thingy"
and then pterm without this fix would have crashed.
2016-03-20 18:30:03 +00:00

16 lines
391 B
C

/*
* x11misc.h: header file for functions that need to refer to Xlib
* data types. Has to be separate from unix.h so that we can include
* it only after including the X headers, which in turn has to be done
* after putty.h has told us whether NOT_X_WINDOWS is defined.
*/
#ifndef NOT_X_WINDOWS
/*
* x11misc.c.
*/
void x11_ignore_error(Display *disp, unsigned char errcode);
#endif