x11: Avoid crashing apps after resolution change or wake after sleep.
This should avoid sending an event with e.g. dimensions of 65528 x 65504 while the originating geometry was only {xp = 4, yp = 28, w = -8, h = -32}. The negative values got casted to a 16-bit unsigned integer and result therefore in this huge resolution, for which xcb_shm_create_segment fails and finally results in a segfault.
This might just be observable with a dual screen setup. And shows just up mostly for maximized Qt based applications.
Ref: https://bugreports.qt.io/browse/QTBUG-109226 Ref: https://bugs.kde.org/show_bug.cgi?id=461723 Ref: https://bugs.kde.org/show_bug.cgi?id=463475