This won’t be easy as it seems. For this to work, cairo surfaces have to be first class citizens within GTK.
The method using GtkPixmap xlgui.icons can be removed as soon as we remove xlgui.oldmenu since that’s the only place where it is used.
There is, however another usage by now: the OSD plugin uses GdkPixmap to create a non-rectangular window shape. To achieve this nowadays, one is supposed to use cairo regions, also not yet usable.
This seems only fixable with GI but cairo still seems to have issues with that since the following will result in an MemoryError:
from gi.repository import cairo
region = cairo.Region()
This won’t be easy as it seems. For this to work, cairo surfaces have to be first class citizens within GTK.
The method using GtkPixmap xlgui.icons can be removed as soon as we remove xlgui.oldmenu since that’s the only place where it is used.
There is, however another usage by now: the OSD plugin uses GdkPixmap to create a non-rectangular window shape. To achieve this nowadays, one is supposed to use cairo regions, also not yet usable.
This seems only fixable with GI but cairo still seems to have issues with that since the following will result in an MemoryError:
from gi.repository import cairo
region = cairo.Region()