1063-nel.patch

Naush, 10/09/2010 06:56 pm

Download (1.7 kB)

b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp Sat Oct 09 14:40:31 2010 +0200
184 184

  
185 185
	// nlinfo("3D: glop %d %d", e.type, e.xmap.window);
186 186

  
187
	// Process the message by the emitter
188
	driver->_EventEmitter.processMessage(e);
189

  
187 190
	// disable menu (default ALT-F4 behavior is disabled)
188 191
	switch(e.type)
189 192
	{
190 193
		case DestroyNotify:
191

  
194
		case ClientMessage:
192 195
		if(driver && driver->ExitFunc)
193 196
		{
194 197
			driver->ExitFunc();
......
240 243
		break;
241 244

  
242 245
		default:
243

  
244
		// Process the message by the emitter
245
		return driver->_EventEmitter.processMessage(e);
246
		break;
247

  
246 248
	}
247 249

  
248 250
	return true;
......
973 975
//	XMapRaised (_dpy, _win);
974 976

  
975 977
//	XMapWindow(_dpy, _win);
978
	Atom wmDeleteMessage = XInternAtom(_dpy, "WM_DELETE_WINDOW", False);
979
	XSetWMProtocols(_dpy, _win, &wmDeleteMessage, 1);
976 980

  
977 981
	_EventEmitter.init (_dpy, _win, this);
978 982

  
b/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp Sat Oct 09 14:40:31 2010 +0200
16 16

  
17 17
#include "stdopengl.h"
18 18
#include "unix_event_emitter.h"
19
#include "driver_opengl.h"
19 20

  
20 21
#if defined(NL_OS_UNIX) && !defined(NL_OS_MAC)
21 22

  
......
590 591
		// XIM server has crashed
591 592
		createIM();
592 593
		break;
594
	case ClientMessage:
595
	{
596
		server->postEvent (new CEventDestroyWindow (this));
597
		break;
598
	}
593 599
	default:
594 600
		//	nlinfo("UnknownEvent");
595 601
		//	XtDispatchEvent(&event);