mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 17:00:52 +00:00
Enlarge protocol array to make space for the _NET_WM_SYNC_REQUEST
protocol atom. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@33224 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
14f89579a9
commit
938f716f55
3 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2011-06-01 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Headers/x11/XGServerWindow.h (GSMaxWMProtocols, _gswindow_device_t):
|
||||||
|
Enlarge protocol array to make space for the _NET_WM_SYNC_REQUEST
|
||||||
|
protocol atom.
|
||||||
|
|
||||||
|
* Source/x11/XGServerWindow.m (_setSupportedWMProtocols:): Add
|
||||||
|
assertion to catch out of bounds errors in the future.
|
||||||
|
|
||||||
2011-05-27 13:53 David Chisnall <theraven@gna.org>
|
2011-05-27 13:53 David Chisnall <theraven@gna.org>
|
||||||
|
|
||||||
* libs/back/trunk/Source/x11/XGServerWindow.m: Call NSZoneFree() on
|
* libs/back/trunk/Source/x11/XGServerWindow.m: Call NSZoneFree() on
|
||||||
|
|
|
@ -72,6 +72,8 @@ typedef struct {
|
||||||
#define WMFHideOtherApplications 10
|
#define WMFHideOtherApplications 10
|
||||||
#define WMFHideApplication 12
|
#define WMFHideApplication 12
|
||||||
|
|
||||||
|
#define GSMaxWMProtocols 5
|
||||||
|
|
||||||
/* Graphics Driver protocol. Setup in [NSGraphicsContext-contextDevice:] */
|
/* Graphics Driver protocol. Setup in [NSGraphicsContext-contextDevice:] */
|
||||||
enum {
|
enum {
|
||||||
GDriverHandlesBacking = 1,
|
GDriverHandlesBacking = 1,
|
||||||
|
@ -109,7 +111,7 @@ typedef struct _gswindow_device_t {
|
||||||
int xoff;
|
int xoff;
|
||||||
int yoff;
|
int yoff;
|
||||||
int boff;
|
int boff;
|
||||||
Atom protocols[4];
|
Atom protocols[GSMaxWMProtocols];
|
||||||
int numProtocols;
|
int numProtocols;
|
||||||
XIC ic;
|
XIC ic;
|
||||||
void *gdriver; /* gdriver ident. Managed by gdriver */
|
void *gdriver; /* gdriver ident. Managed by gdriver */
|
||||||
|
|
|
@ -1456,6 +1456,9 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
||||||
{
|
{
|
||||||
window->protocols[window->numProtocols++] = generic.miniaturize_atom;
|
window->protocols[window->numProtocols++] = generic.miniaturize_atom;
|
||||||
}
|
}
|
||||||
|
NSAssert1(window->numProtocols <= GSMaxWMProtocols,
|
||||||
|
@"Too many protocols (%d > GSMaxWMProtocols)",
|
||||||
|
window->numProtocols);
|
||||||
XSetWMProtocols(dpy, window->ident, window->protocols, window->numProtocols);
|
XSetWMProtocols(dpy, window->ident, window->protocols, window->numProtocols);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue