--- uae/src/xwin.c 2018/04/24 16:51:21 1.1.1.9 +++ uae/src/xwin.c 2018/04/24 16:58:14 1.1.1.12 @@ -29,7 +29,6 @@ #include "xwin.h" #include "custom.h" #include "drawing.h" -#include "readcpu.h" #include "newcpu.h" #include "keyboard.h" #include "keybuf.h" @@ -65,7 +64,7 @@ #define DO_PUTIMAGE(IMG, SRCX, SRCY, DSTX, DSTY, WIDTH, HEIGHT) \ do { \ - if (currprefs.x11_use_mitshm) \ + if (currprefs.x11_use_mitshm && shmavail) \ XShmPutImage (display, mywin, mygc, (IMG), (SRCX), (SRCY), (DSTX), (DSTY), (WIDTH), (HEIGHT), 0); \ else \ XPutImage (display, mywin, mygc, (IMG), (SRCX), (SRCY), (DSTX), (DSTY), (WIDTH), (HEIGHT)); \ @@ -444,7 +443,7 @@ void flush_screen (int ystart, int ystop return; #if SHM_SUPPORT_LINKS == 1 - if (currprefs.x11_use_mitshm) + if (currprefs.x11_use_mitshm && shmavail) XSync (display, 0); #endif } @@ -1437,7 +1436,7 @@ void handle_events (void) lastmy += ((XMotionEvent *)&event)->y_root; } else if (grabbed) { int realmove = 0; - int tx, ty; + int tx, ty,ttx,tty; tx = ((XMotionEvent *)&event)->x; ty = ((XMotionEvent *)&event)->y; @@ -1454,17 +1453,20 @@ void handle_events (void) { #undef ABS XEvent event; - tx = current_width / 2; - ty = current_height / 2; + ttx = current_width / 2; + tty = current_height / 2; event.type = MotionNotify; event.xmotion.display = display; event.xmotion.window = mywin; - event.xmotion.x = tx; - event.xmotion.y = ty; + event.xmotion.x = ttx; + event.xmotion.y = tty; XSendEvent (display, mywin, False, PointerMotionMask, &event); - XWarpPointer (display, None, mywin, 0, 0, 0, 0, tx, ty); + XWarpPointer (display, None, mywin, 0, 0, 0, 0, ttx, tty); } + } else { + tx=event.xmotion.x; + ty=event.xmotion.y; } oldx = tx; oldy = ty; @@ -1603,6 +1605,9 @@ int check_prefs_changed_gfx (void) currprefs.gfx_ycenter = changed_prefs.gfx_ycenter; currprefs.gfx_afullscreen = changed_prefs.gfx_afullscreen; currprefs.gfx_pfullscreen = changed_prefs.gfx_pfullscreen; + + gui_update_gfx (); + graphics_subinit (); if (! inwindow)