mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-09 13:29:48 -05:00
Screenshots were upside down
This commit is contained in:
parent
640924f37a
commit
0fe0eb330c
1 changed files with 2 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ screenshooter_shoot(struct wl_client *client, struct wl_screenshooter *shooter)
|
||||||
struct wlsc_compositor *ec = shooter->ec;
|
struct wlsc_compositor *ec = shooter->ec;
|
||||||
struct wlsc_output *output;
|
struct wlsc_output *output;
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
GdkPixbuf *pixbuf, *normal;
|
GdkPixbuf *pixbuf;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
@ -59,9 +59,7 @@ screenshooter_shoot(struct wl_client *client, struct wl_screenshooter *shooter)
|
||||||
pixbuf = gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB, TRUE,
|
pixbuf = gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB, TRUE,
|
||||||
8, output->width, output->height, output->width * 4,
|
8, output->width, output->height, output->width * 4,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
normal = gdk_pixbuf_flip(pixbuf, FALSE);
|
gdk_pixbuf_save(pixbuf, buffer, "png", &error, NULL);
|
||||||
gdk_pixbuf_save(normal, buffer, "png", &error, NULL);
|
|
||||||
g_object_unref(normal);
|
|
||||||
g_object_unref(pixbuf);
|
g_object_unref(pixbuf);
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue