On Sun, 25 Nov 2012, BALATON Zoltan escribió: > On Sun, 25 Nov 2012, Rodolfo García Peñas wrote: > >I am not sure if the testing application is working. > >The application only show a dock (miniwindow) with a > >white square inside. > > > >kix@osaka:~/src/wmaker/wmaker-crm/src$ /home/kix/wmicontest > >Opened display :1 > >XCreateSimpleWindow returned: 3400001 > >XCreateSimpleWindow returned: 3400002 > >XMapWindow returned: 1 > > Read it before you run it! Press enter to move on to the next step > when it opens a window. You can try to minimise it. Then press enter > again (in the terminal you've started it from) to finish. > > >If I run it with the lines commented, then the application > >doesn't have the white square. > > That means it would break apps which display something in their > appicon. Did you try dockapps? (The white square is the icon > window.)
The problem is because the "icon->icon_win == None". See the wIconUpdate function at [1]. This function is different than the next branch, I did a lot of changes, but the idea is the same. See the flow with the removed lines: icon_create_for_wwindow set_icon_for_window: wIconUpdate wIconUpdate icon 0x936cd0 wwin 0x93f000 flag 0 wIconUpdate:get_rimage_icon_from_user_icon 4 icon 0x936cd0 wIconUpdate icon 0x936cd0 wwin 0x93f000 flag 0 wIconUpdate:get_rimage_icon_from_user_icon 4 icon 0x936cd0 Or with the lines (original code/next code): icon_create_for_wwindow set_icon_for_window: wIconUpdate wIconUpdate icon 0x19bfd30 wwin 0x19c1a90 flag 0 wIconUpdate:get_rimage_icon_from_icon_win 2 icon 0x19bfd30 wIconUpdate icon 0x19bfd30 wwin 0x19c1a90 flag 0 wIconUpdate:get_rimage_icon_from_icon_win 2 icon 0x19bfd30 If I remove the lines, then "icon->icon_win == None", and then jump to the default icon. Else, get the icon from the wm_hints/net_icon_image. About your question about dockapps, they are fine here. Why? Dockapps works in a extrange way. The try to get the image for their dock. If the image is found, then, they set the image, else, set the wmaker default image. Whats happend if the application is running, then, the application background is set to the tile background (grey/blue/...), and the put the application inside the icon. But it the application is not running, the icon for the application is painted. If you click on the dockapp, the icon image is removed, the background is set and the application is put inside the icon. Regards, kix [1] void wIconUpdate(WIcon *icon, RImage *image) { WWindow *wwin = NULL; printf("wIconUpdate icon %p\n", icon); if (image) { icon->file_image = image; } else { if (icon && icon->owner) wwin = icon->owner; if (wwin) printf("wwin %p flag %d\n", wwin, WFLAGP(wwin, always_user_icon)); if (wwin && WFLAGP(wwin, always_user_icon)) { /* Forced use user_icon */ printf("wIconUpdate:get_rimage_icon_from_user_icon 1 icon %p\n", icon); get_rimage_icon_from_user_icon(icon); } else if (icon->icon_win != None) { /* Free the icon info */ unset_icon_image(icon); /* Get the Pixmap from the WIcon's Window */ printf("wIconUpdate:get_rimage_icon_from_icon_win 2 icon %p\n", icon); icon->file_image = get_rimage_icon_from_icon_win(icon); } else if (wwin && wwin->net_icon_image) { /* Remove the icon image */ unset_icon_image(icon); /* Get the icon from wwin->net_icon_image. * wwin->net_icon_image is NULL only if no icon was * found. Then, return the default image */ printf("wIconUpdate:get_window_image_def 3 icon %p\n", icon); icon->file_image = get_window_image_def(wwin); } else { /* Get the Pixmap from the user */ printf("wIconUpdate:get_rimage_icon_from_user_icon 4 icon %p\n", icon); get_rimage_icon_from_user_icon(icon); } } update_icon_pixmap(icon); } -- ||// //\\// Rodolfo "kix" Garcia ||\\// //\\ http://www.kix.es/ -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.