wavexx / screenkey

A screencast tool to display your keys inspired by Screenflick
https://www.thregr.org/~wavexx/software/screenkey/
GNU General Public License v3.0
757 stars 66 forks source link

HiDPI display support #9

Closed 4e6 closed 9 years ago

4e6 commented 9 years ago

With DPI higher than 96, default value, screenkey fails with 'BadAlloc (insufficient resources for operation)'

The program 'screenkey' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 518 error_code 11 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

This happens because function override_font_attributes calculates AttrSize font value larger than current window height can handle. That leads to recursive resizing of window (each window resize event results in call to override_font_attributes).