forked from enlightenment/efl
add error handler settign and resetting and retunr status of display init
SVN revision: 4537
This commit is contained in:
parent
514ec9b6ae
commit
c20a541305
|
@ -112,10 +112,11 @@ void e_window_add_events(Window win, long mask);
|
|||
void e_window_move(Window win, int x, int y);
|
||||
void e_window_resize(Window win, int w, int h);
|
||||
void e_window_move_resize(Window win, int x, int y, int w,
|
||||
|
||||
int h);
|
||||
int e_x_get_fd(void);
|
||||
void e_display_init(char *display);
|
||||
void e_set_error_handler(void (*func) (Display * d, XErrorEvent * ev));
|
||||
void e_reset_error_handler(void);
|
||||
int e_display_init(char *display);
|
||||
int e_events_pending(void);
|
||||
void e_get_next_event(XEvent * event);
|
||||
int e_event_shape_get_id(void);
|
||||
|
|
|
@ -745,6 +745,19 @@ e_x_get_fd(void)
|
|||
}
|
||||
|
||||
void
|
||||
e_set_error_handler(void (*func) (Display * d, XErrorEvent * ev))
|
||||
|
||||
{
|
||||
XSetErrorHandler((XErrorHandler)func);
|
||||
}
|
||||
|
||||
void
|
||||
e_reset_error_handler(void)
|
||||
{
|
||||
XSetErrorHandler((XErrorHandler) e_handle_x_error);
|
||||
}
|
||||
|
||||
int
|
||||
e_display_init(char *display)
|
||||
{
|
||||
int revert;
|
||||
|
@ -756,6 +769,7 @@ e_display_init(char *display)
|
|||
char *d;
|
||||
|
||||
d = getenv("DISPLAY");
|
||||
/* no need for this anymore
|
||||
if (d)
|
||||
fprintf(stderr,
|
||||
"Fatal Error:\n"
|
||||
|
@ -769,7 +783,8 @@ e_display_init(char *display)
|
|||
"No DISPLAY variable set so cannot determine display to connect to.\n"
|
||||
"Try setting your DISPLAY variable like:\n"
|
||||
"DISPLAY=host:0 appication_name\n");
|
||||
exit(1);
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
XSetErrorHandler((XErrorHandler) e_handle_x_error);
|
||||
XSetIOErrorHandler((XIOErrorHandler) e_handle_x_io_error);
|
||||
|
@ -787,6 +802,7 @@ e_display_init(char *display)
|
|||
XEV_CONFIGURE | XEV_CHILD_CHANGE | XEV_PROPERTY |
|
||||
XEV_COLORMAP | XEV_VISIBILITY);
|
||||
e_pointer_xy(0, NULL, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue