mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
Remove meta_ui_get_pixbuf_from_pixmap() function
https://bugzilla.gnome.org/show_bug.cgi?id=630203
This commit is contained in:
parent
0a88329526
commit
d4d05e496a
@ -200,8 +200,6 @@ int meta_ui_get_drag_threshold (MetaUI *ui);
|
|||||||
|
|
||||||
MetaUIDirection meta_ui_get_direction (void);
|
MetaUIDirection meta_ui_get_direction (void);
|
||||||
|
|
||||||
GdkPixbuf *meta_ui_get_pixbuf_from_pixmap (Pixmap pmap);
|
|
||||||
|
|
||||||
#include "tabpopup.h"
|
#include "tabpopup.h"
|
||||||
#include "tile-preview.h"
|
#include "tile-preview.h"
|
||||||
|
|
||||||
|
27
src/ui/ui.c
27
src/ui/ui.c
@ -982,30 +982,3 @@ meta_ui_get_direction (void)
|
|||||||
return META_UI_DIRECTION_LTR;
|
return META_UI_DIRECTION_LTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkPixbuf *
|
|
||||||
meta_ui_get_pixbuf_from_pixmap (Pixmap pmap)
|
|
||||||
{
|
|
||||||
GdkPixmap *gpmap;
|
|
||||||
GdkScreen *screen;
|
|
||||||
GdkPixbuf *pixbuf;
|
|
||||||
GdkColormap *cmap;
|
|
||||||
int width, height, depth;
|
|
||||||
|
|
||||||
gpmap = gdk_pixmap_foreign_new (pmap);
|
|
||||||
screen = gdk_drawable_get_screen (gpmap);
|
|
||||||
|
|
||||||
gdk_drawable_get_size (GDK_DRAWABLE (gpmap), &width, &height);
|
|
||||||
|
|
||||||
depth = gdk_drawable_get_depth (GDK_DRAWABLE (gpmap));
|
|
||||||
if (depth <= 24)
|
|
||||||
cmap = gdk_screen_get_system_colormap (screen);
|
|
||||||
else
|
|
||||||
cmap = gdk_screen_get_rgba_colormap (screen);
|
|
||||||
|
|
||||||
pixbuf = gdk_pixbuf_get_from_drawable (NULL, gpmap, cmap, 0, 0, 0, 0,
|
|
||||||
width, height);
|
|
||||||
|
|
||||||
g_object_unref (gpmap);
|
|
||||||
|
|
||||||
return pixbuf;
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user