diff options
-rw-r--r-- | plat.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -463,6 +463,7 @@ App* new_app(Heap* mem, int w, int h, const char* n) { a->h = h; i->d = XOpenDisplay(0); i->omx = i->omy = 0; + i->ms = 1; if (!i->d) { print_err("Failed to open X11 display.\n"); pbreak(error_platform_error); @@ -565,6 +566,20 @@ void app_begin(App* a) { a->dmy = a->my - i->omy; i->omx = a->mx; i->omy = a->my; + if (!i->ms) { + XWarpPointer( + d, + i->wi, + i->wi, + 0, + 0, + 0, + 0, + i->w / 2, + i->h / 2 + ); + XSync(d, False); + } } void app_rencpy( |