diff options
Diffstat (limited to 'src/common/surface.c')
| -rw-r--r-- | src/common/surface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/surface.c b/src/common/surface.c index 897b95a..9b4a8ad 100644 --- a/src/common/surface.c +++ b/src/common/surface.c @@ -32,13 +32,14 @@ bool yasl_public_fail(int error) else if (error==ENOMEM) code=YASL_ERROR_NO_MEMORY; else if (error==EBUSY) code=YASL_ERROR_BUSY; else if (error==EPERM) code=YASL_ERROR_WRONG_THREAD; + else if (error==ENOTCONN) code=YASL_ERROR_DISCONNECTED; yasl_public_set_error(code,error); errno=error; return false; } enum yasl_error yasl_get_error(const char **description) { static const char *const messages[]={"No error","Invalid argument","Unsupported operation", "Out of memory","Library not initialized","Operation is busy","Wrong thread", - "Input context expired","Native operation failed"}; + "Input context expired","Native operation failed","Display disconnected"}; if(description) *description=messages[last_error]; return last_error; } @@ -254,6 +255,7 @@ static bool convert_event(const struct yasl_private_event *p,yasl_event *e) case YASL_PRIVATE_EVENT_DISPLAY_QUIT:e->type=YASL_EVENT_QUIT;break; case YASL_PRIVATE_EVENT_DISPLAY_REOPEN:e->type=YASL_EVENT_REOPEN;break; case YASL_PRIVATE_EVENT_DISPLAY_LOST:e->type=YASL_EVENT_DISPLAY_LOST;break; + case YASL_PRIVATE_EVENT_DISPLAY_RESTORED:e->type=YASL_EVENT_DISPLAY_RESTORED;break; case YASL_PRIVATE_EVENT_REFRESH: if(!p->surface) return false; if(!refresh_ready(p->surface)) { p->surface->refresh_owed=true; return false; } |
