forked from enlightenment/efl
parent
50d0af9d5e
commit
eb650a7300
|
@ -138,6 +138,7 @@ EAPI int ECORE_X_LOCK_NUM = 0;
|
|||
EAPI int ECORE_X_LOCK_CAPS = 0;
|
||||
|
||||
#ifdef LOGRT
|
||||
static double t0 = 0.0;
|
||||
static Status (*_logrt_real_reply) (Display *disp, void *rep, int extra, Bool discard) = NULL;
|
||||
static void
|
||||
_logrt_init(void)
|
||||
|
@ -149,6 +150,7 @@ _logrt_init(void)
|
|||
if (!lib) lib = dlopen("libX11.so.6.3", RTLD_GLOBAL | RTLD_LAZY);
|
||||
if (!lib) lib = dlopen("libX11.so.6.3.0", RTLD_GLOBAL | RTLD_LAZY);
|
||||
_logrt_real_reply = dlsym(lib, "_XReply");
|
||||
t0 = ecore_time_get();
|
||||
}
|
||||
Status
|
||||
_XReply(Display *disp, void *rep, int extra, Bool discard)
|
||||
|
@ -161,7 +163,7 @@ _XReply(Display *disp, void *rep, int extra, Bool discard)
|
|||
if (n > 0)
|
||||
{
|
||||
sym = backtrace_symbols(bt, n);
|
||||
printf("ROUNDTRIP: ");
|
||||
printf("ROUNDTRIP: %4.4f :", ecore_time_get() - t0);
|
||||
if (sym)
|
||||
{
|
||||
for (i = n - 1; i > 0; i--)
|
||||
|
@ -1265,23 +1267,15 @@ EAPI void
|
|||
ecore_x_grab(void)
|
||||
{
|
||||
_ecore_x_grab_count++;
|
||||
|
||||
if (_ecore_x_grab_count == 1)
|
||||
XGrabServer(_ecore_x_disp);
|
||||
if (_ecore_x_grab_count == 1) XGrabServer(_ecore_x_disp);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_ungrab(void)
|
||||
{
|
||||
_ecore_x_grab_count--;
|
||||
if (_ecore_x_grab_count < 0)
|
||||
_ecore_x_grab_count = 0;
|
||||
|
||||
if (_ecore_x_grab_count == 0)
|
||||
{
|
||||
XUngrabServer(_ecore_x_disp);
|
||||
XSync(_ecore_x_disp, False);
|
||||
}
|
||||
if (_ecore_x_grab_count < 0) _ecore_x_grab_count = 0;
|
||||
if (_ecore_x_grab_count == 0) XUngrabServer(_ecore_x_disp);
|
||||
}
|
||||
|
||||
int _ecore_window_grabs_num = 0;
|
||||
|
|
|
@ -1776,7 +1776,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
&& (xevent->xclient.format == 32))
|
||||
{
|
||||
Ecore_X_Event_Ping *e;
|
||||
Ecore_X_Window root;
|
||||
Ecore_X_Window root = 0;
|
||||
|
||||
e = calloc(1, sizeof(Ecore_X_Event_Ping));
|
||||
if (!e) return;
|
||||
|
@ -1784,9 +1784,13 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
|
|||
e->time = xevent->xclient.data.l[1];
|
||||
e->event_win = xevent->xclient.data.l[2];
|
||||
|
||||
ecore_event_add(ECORE_X_EVENT_PING, e, NULL, NULL);
|
||||
/* send a reply anyway - we are alive... eventloop at least */
|
||||
root = ecore_x_window_root_get(e->win);
|
||||
ecore_event_add(ECORE_X_EVENT_PING, e, NULL, NULL);
|
||||
if (ScreenCount(_ecore_x_disp) > 1)
|
||||
root = ecore_x_window_root_get(e->win);
|
||||
else
|
||||
root = DefaultRootWindow(_ecore_x_disp);
|
||||
|
||||
if (xevent->xclient.window != root)
|
||||
{
|
||||
xevent->xclient.window = root;
|
||||
|
|
Loading…
Reference in New Issue