From: "Rodolfo García Peñas (kix)" <k...@kix.es> The function get_wwindow_image_from_wm_hints is moved to wmspec.[ch] files, because this function is not related to the icon stuff, is related to the window manager specs.
Now, the window manager spec functions to get the icons are together: - RImage *get_wwindow_image_from_wm_hints(WWindow *wwin) - RImage *get_window_image_from_x11(Window window) --- src/icon.c | 14 -------------- src/wmspec.c | 14 ++++++++++++++ src/wmspec.h | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/icon.c b/src/icon.c index 7119a26..4306a6e 100644 --- a/src/icon.c +++ b/src/icon.c @@ -464,20 +464,6 @@ static char *get_icon_cache_path(void) return NULL; } -static RImage *get_wwindow_image_from_wm_hints(WWindow *wwin) -{ - RImage *image = NULL; - XWMHints *hints = wwin->wm_hints; - - if (hints && (hints->flags & IconPixmapHint) && hints->icon_pixmap != None) - image = RCreateImageFromDrawable(wwin->screen_ptr->rcontext, - hints->icon_pixmap, - (hints->flags & IconMaskHint) - ? hints->icon_mask : None); - - return image; -} - /* * wIconStore-- * Stores the client supplied icon at CACHE_ICON_PATH diff --git a/src/wmspec.c b/src/wmspec.c index c758f0a..20a6b5e 100644 --- a/src/wmspec.c +++ b/src/wmspec.c @@ -420,6 +420,20 @@ static RImage *makeRImageFromARGBData(unsigned long *data) return image; } +RImage *get_wwindow_image_from_wm_hints(WWindow *wwin) +{ + RImage *image = NULL; + XWMHints *hints = wwin->wm_hints; + + if (hints && (hints->flags & IconPixmapHint) && hints->icon_pixmap != None) + image = RCreateImageFromDrawable(wwin->screen_ptr->rcontext, + hints->icon_pixmap, + (hints->flags & IconMaskHint) + ? hints->icon_mask : None); + + return image; +} + RImage *get_window_image_from_x11(Window window) { RImage *image; diff --git a/src/wmspec.h b/src/wmspec.h index 5bb26f0..5e9d5a3 100644 --- a/src/wmspec.h +++ b/src/wmspec.h @@ -45,5 +45,6 @@ char *wNETWMGetIconName(Window window); char *wNETWMGetWindowName(Window window); void wNETFrameExtents(WWindow *wwin); void wNETCleanupFrameExtents(WWindow *wwin); +RImage *get_wwindow_image_from_wm_hints(WWindow *wwin); RImage *get_window_image_from_x11(Window window); #endif -- 1.7.10.4 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.