I've split up my previous patch into six smaller ones, making it
more logical to follow.

The patches applies one after another.

   (cat fvwm-xcursor_p?.diff | patch -p0)
or
   (tar -xzOf fvwm-xcursor-patches.tar.gz | patch -p0)


* fvwm-xcursor_p1.diff

   Without this patch, every call to PImageCreatePixmapFromArgbData
   is made from almost identical blocks of about 20 lines of code.
   Two or three pixmaps are created before the function call, and
   then destroyed afterwards if they weren't needed.

   This patch removes that duplicate code. Pixmaps aren't created
   until there is an image to put, making the XFreePixmap calls
   unnecessary. The actual XCreatePixmap call is moved to the new
   local function PImageCreatePixmapFromFImage, which is called
   up to three times from within PImageCreatePixmapFromArgbData.


* fvwm-xcursor_p2.diff

   This patch revises the logic of PImageCreatePixmapFromArgbData.
   Most notably; the mask pixmap is no longer created for fully
   opaque (all alpha == 0xff) or translucent (0 < any alpha < 0xff)
   images.


* fvwm-xcursor_p3.diff

   This patch removes duplicate code; modifing PImageLoadXpm to
   make use of PImageCreatePixmapFromArgbData.


* fvwm-xcursor_p4.diff

   This patch moves the PImageCreatePixmapFromArgbData call from
   the image loaders into PImageLoadPixmapFromFile. The entire
   bitmap loader is moved there as well and PImageLoadBitmap is
   removed. Most of the old PImageLoadPixmapFromFile is made into
   the new local function PImageLoadArgbDataFromFile.


* fvwm-xcursor_p5.diff

   With this patch, the xpm specific PImageLoadCursorPixmapFromFile
   is replaced by the general PImageLoadCursorFromFile, which uses
   PImageLoadArgbDataFromFile and PImageCreatePixmapFromArgbData.
   New hot-spot arguments are added to the CursorStyle command,
   allowing PNG and SVG images to be loaded as mouse cursors.


* fvwm-xcursor_p6.diff

   This is the actual Xcursor patch, adding libXcursor calls to
   PImageLoadCursorFromFile, making it possible to load ARGB and
   animated mouse cursors.


/Simon Griph

Attachment: fvwm-xcursor-patches.tar.gz
Description: application/gzip

Reply via email to