qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs x11.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs x11.c
Date: Tue, 26 Jul 2016 09:43:14 +0000 (UTC)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        16/07/26 09:43:14

Modified files:
        .              : x11.c 

Log message:
        x11: fix compilation without Xshm
        
        - patches by Francois Revol to allow compilation in some
          X11 environments without Xshm support.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/x11.c?cvsroot=qemacs&r1=1.41&r2=1.42

Patches:
Index: x11.c
===================================================================
RCS file: /sources/qemacs/qemacs/x11.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- x11.c       11 Jun 2016 15:55:46 -0000      1.41
+++ x11.c       26 Jul 2016 09:43:14 -0000      1.42
@@ -1536,8 +1536,10 @@
 #endif
 #ifdef CONFIG_XV
     BMP_XVIMAGE,
+#ifdef CONFIG_XSHM
     BMP_XVSHMIMAGE,
 #endif
+#endif
 };
 
 typedef struct X11Bitmap {
@@ -1569,9 +1571,11 @@
     if (b->flags & QEBITMAP_FLAG_VIDEO) {
 #if defined(CONFIG_XV)
         if (xv_port != 0 && xv_open_count == 0) {
+#ifdef CONFIG_XSHM
             if (shm_use)
                 xb->type = BMP_XVSHMIMAGE;
             else
+#endif
                 xb->type = BMP_XVIMAGE;
             b->format = s->video_format;
             xv_open_count++;
@@ -1645,6 +1649,7 @@
             xb->u.xvimage = xvimage;
         }
         break;
+#ifdef CONFIG_XSHM
     case BMP_XVSHMIMAGE:
         {
             XvImage *xvimage;
@@ -1670,6 +1675,7 @@
         }
         break;
 #endif
+#endif
     }
     return 0;
  fail:
@@ -1703,6 +1709,7 @@
         XFree(xb->u.xvimage);
         xv_open_count--;
         break;
+#ifdef CONFIG_XSHM
     case BMP_XVSHMIMAGE:
         XShmDetach(display, xb->shm_info);
         XFree(xb->u.xvimage);
@@ -1711,6 +1718,7 @@
         xv_open_count--;
         break;
 #endif
+#endif
     }
     qe_free(&b->priv_data);
 }
@@ -1749,12 +1757,14 @@
                    0, 0, b->width, b->height,
                    dst_x, dst_y, dst_w, dst_h);
         break;
+#ifdef CONFIG_XSHM
     case BMP_XVSHMIMAGE:
         XvShmPutImage(display, xv_port, window, gc, xb->u.xvimage,
                       0, 0, b->width, b->height,
                       dst_x, dst_y, dst_w, dst_h, False);
         break;
 #endif
+#endif
     }
 }
 
@@ -1792,7 +1802,9 @@
         break;
 #ifdef CONFIG_XV
     case BMP_XVIMAGE:
+#ifdef CONFIG_XSHM
     case BMP_XVSHMIMAGE:
+#endif
         /* XXX: only YUV420P is handled yet */
         {
             XvImage *xvimage = xb->u.xvimage;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]