From: "Rodolfo García Peñas (kix)" <k...@kix.es> Now WWindow always has window because is created when the window is created.
We need set the X-Position for the window, because else is placed at 0,0. Then we set it with XMoveWindow. --- src/actions.c | 9 ++++++--- src/window.c | 9 +++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/actions.c b/src/actions.c index e1e6aaa..5f9d01e 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1082,7 +1082,7 @@ static WWindow *recursiveTransientFor(WWindow * wwin) return wwin; } -void wIconifyWindow(WWindow * wwin) +void wIconifyWindow(WWindow *wwin) { XWindowAttributes attribs; int present; @@ -1114,7 +1114,8 @@ void wIconifyWindow(WWindow * wwin) if (!wwin->flags.icon_moved) PlaceIcon(wwin->screen_ptr, &wwin->icon_x, &wwin->icon_y, wGetHeadForWindow(wwin)); - wwin->icon = icon_create_for_wwindow(wwin); + /* Update the icon pixmap */ + update_icon_pixmap(wwin->icon); wwin->icon->mapped = 1; } @@ -1170,8 +1171,10 @@ void wIconifyWindow(WWindow * wwin) if (!wPreferences.disable_miniwindows && !wwin->flags.net_handle_icon) { if (wwin->screen_ptr->current_workspace == wwin->frame->workspace || - IS_OMNIPRESENT(wwin) || wPreferences.sticky_icons) + IS_OMNIPRESENT(wwin) || wPreferences.sticky_icons) { XMapWindow(dpy, wwin->icon->core->window); + XMoveWindow(dpy, wwin->icon->core->window, wwin->icon_x, wwin->icon_y); + } AddToStackList(wwin->icon->core); wLowerFrame(wwin->icon->core); diff --git a/src/window.c b/src/window.c index 1cb384a..ac36b1c 100644 --- a/src/window.c +++ b/src/window.c @@ -819,6 +819,7 @@ WWindow *wManageWindow(WScreen *scr, Window window) if (WFLAGP(wwin, start_maximized) && IS_RESIZABLE(wwin)) wwin->flags.maximized = MAX_VERTICAL | MAX_HORIZONTAL; + /* FIXME: Remove this line? */ wNETWMCheckInitialClientState(wwin); /* apply previous state if it exists and we're in startup */ @@ -1357,6 +1358,14 @@ WWindow *wManageWindow(WScreen *scr, Window window) wwin = NULL; } + if (wwin) { + /* Create the icon for the window */ + wwin->icon = icon_create_for_wwindow(wwin); + + /* Create the window icon */ + wwin->net_icon_image = get_window_image_from_x11(wwin->client_win); + } + return wwin; } -- 1.7.10.4 -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.