[libwnck/wip/muktupavels/prepare-for-wnck-handle: 2/8] xutils: change _wnck_read_icons screen parameter type
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/muktupavels/prepare-for-wnck-handle: 2/8] xutils: change _wnck_read_icons screen parameter type
- Date: Tue, 20 Aug 2019 19:17:28 +0000 (UTC)
commit 3c356af4700dc3735acccccafc32778c96573f3b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Aug 20 20:55:42 2019 +0300
xutils: change _wnck_read_icons screen parameter type
libwnck/application.c | 2 +-
libwnck/window.c | 2 +-
libwnck/xutils.c | 32 +++++++++++++++++---------------
libwnck/xutils.h | 20 +++++++++++---------
4 files changed, 30 insertions(+), 26 deletions(-)
---
diff --git a/libwnck/application.c b/libwnck/application.c
index 727d1dd..26c880c 100644
--- a/libwnck/application.c
+++ b/libwnck/application.c
@@ -337,7 +337,7 @@ get_icons (WnckApplication *app)
normal_size = _wnck_get_default_icon_size ();
mini_size = _wnck_get_default_mini_icon_size ();
- if (_wnck_read_icons (WNCK_SCREEN_XSCREEN (app->priv->screen),
+ if (_wnck_read_icons (app->priv->screen,
app->priv->xwindow,
app->priv->icon_cache,
&icon, normal_size, normal_size,
diff --git a/libwnck/window.c b/libwnck/window.c
index 315bf67..ce95626 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -2123,7 +2123,7 @@ get_icons (WnckWindow *window)
normal_size = _wnck_get_default_icon_size ();
mini_size = _wnck_get_default_mini_icon_size ();
- if (_wnck_read_icons (WNCK_SCREEN_XSCREEN (window->priv->screen),
+ if (_wnck_read_icons (window->priv->screen,
window->priv->xwindow,
window->priv->icon_cache,
&icon, normal_size, normal_size,
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 58bbe97..a8f62da 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -2147,16 +2147,17 @@ scaled_from_pixdata (guchar *pixdata,
}
gboolean
-_wnck_read_icons (Screen *screen,
- Window xwindow,
- WnckIconCache *icon_cache,
- GdkPixbuf **iconp,
- int ideal_width,
- int ideal_height,
- GdkPixbuf **mini_iconp,
- int ideal_mini_width,
- int ideal_mini_height)
-{
+_wnck_read_icons (WnckScreen *screen,
+ Window xwindow,
+ WnckIconCache *icon_cache,
+ GdkPixbuf **iconp,
+ int ideal_width,
+ int ideal_height,
+ GdkPixbuf **mini_iconp,
+ int ideal_mini_width,
+ int ideal_mini_height)
+{
+ Screen *xscreen;
Display *display;
guchar *pixdata;
int w, h;
@@ -2170,7 +2171,8 @@ _wnck_read_icons (Screen *screen,
g_return_val_if_fail (icon_cache != NULL, FALSE);
- display = DisplayOfScreen (screen);
+ xscreen = _wnck_screen_get_xscreen (screen);
+ display = DisplayOfScreen (xscreen);
*iconp = NULL;
*mini_iconp = NULL;
@@ -2206,7 +2208,7 @@ _wnck_read_icons (Screen *screen,
{
icon_cache->net_wm_icon_dirty = FALSE;
- if (read_rgb_icon (screen, xwindow,
+ if (read_rgb_icon (xscreen, xwindow,
ideal_width, ideal_height,
ideal_mini_width, ideal_mini_height,
&w, &h, &pixdata,
@@ -2253,7 +2255,7 @@ _wnck_read_icons (Screen *screen,
mask != icon_cache->prev_mask) &&
pixmap != None)
{
- if (try_pixmap_and_mask (screen, pixmap, mask,
+ if (try_pixmap_and_mask (xscreen, pixmap, mask,
iconp, ideal_width, ideal_height,
mini_iconp, ideal_mini_width, ideal_mini_height))
{
@@ -2273,13 +2275,13 @@ _wnck_read_icons (Screen *screen,
{
icon_cache->kwm_win_icon_dirty = FALSE;
- get_kwm_win_icon (screen, xwindow, &pixmap, &mask);
+ get_kwm_win_icon (xscreen, xwindow, &pixmap, &mask);
if ((pixmap != icon_cache->prev_pixmap ||
mask != icon_cache->prev_mask) &&
pixmap != None)
{
- if (try_pixmap_and_mask (screen, pixmap, mask,
+ if (try_pixmap_and_mask (xscreen, pixmap, mask,
iconp, ideal_width, ideal_height,
mini_iconp, ideal_mini_width, ideal_mini_height))
{
diff --git a/libwnck/xutils.h b/libwnck/xutils.h
index 6426d8d..9e660d9 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -27,6 +27,7 @@
#include <X11/Xatom.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
+#include <libwnck/screen.h>
G_BEGIN_DECLS
@@ -166,15 +167,16 @@ void _wnck_icon_cache_set_want_fallback (WnckIconCache *icon_cache,
gboolean setting);
gboolean _wnck_icon_cache_get_is_fallback (WnckIconCache *icon_cache);
-gboolean _wnck_read_icons (Screen *screen,
- Window xwindow,
- WnckIconCache *icon_cache,
- GdkPixbuf **iconp,
- int ideal_width,
- int ideal_height,
- GdkPixbuf **mini_iconp,
- int ideal_mini_width,
- int ideal_mini_height);
+gboolean _wnck_read_icons (WnckScreen *screen,
+ Window xwindow,
+ WnckIconCache *icon_cache,
+ GdkPixbuf **iconp,
+ int ideal_width,
+ int ideal_height,
+ GdkPixbuf **mini_iconp,
+ int ideal_mini_width,
+ int ideal_mini_height);
+
void _wnck_get_fallback_icons (GdkPixbuf **iconp,
int ideal_width,
int ideal_height,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]