… | |
… | |
874 | #if ENABLE_XEMBED |
874 | #if ENABLE_XEMBED |
875 | if (rs[Rs_embed]) |
875 | if (rs[Rs_embed]) |
876 | { |
876 | { |
877 | long info[2] = { 0, XEMBED_MAPPED }; |
877 | long info[2] = { 0, XEMBED_MAPPED }; |
878 | |
878 | |
879 | XChangeProperty (dpy, parent[0], xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], |
879 | XChangeProperty (dpy, parent, xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], |
880 | 32, PropModeReplace, (unsigned char *)&info, 2); |
880 | 32, PropModeReplace, (unsigned char *)&info, 2); |
881 | } |
881 | } |
882 | #endif |
882 | #endif |
883 | |
883 | |
884 | XMapWindow (dpy, vt); |
884 | XMapWindow (dpy, vt); |
885 | XMapWindow (dpy, parent[0]); |
885 | XMapWindow (dpy, parent); |
886 | |
886 | |
887 | refresh_check (); |
887 | refresh_check (); |
888 | } |
888 | } |
889 | |
889 | |
890 | /*----------------------------------------------------------------------*/ |
890 | /*----------------------------------------------------------------------*/ |
… | |
… | |
916 | |
916 | |
917 | env_display = (char *)rxvt_malloc (strlen (val) + 9); |
917 | env_display = (char *)rxvt_malloc (strlen (val) + 9); |
918 | |
918 | |
919 | sprintf (env_display, "DISPLAY=%s", val); |
919 | sprintf (env_display, "DISPLAY=%s", val); |
920 | |
920 | |
921 | sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent[0]); |
921 | sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent); |
922 | |
922 | |
923 | /* add entries to the environment: |
923 | /* add entries to the environment: |
924 | * @ DISPLAY: in case we started with -display |
924 | * @ DISPLAY: in case we started with -display |
925 | * @ WINDOWID: X window id number of the window |
925 | * @ WINDOWID: X window id number of the window |
926 | * @ COLORTERM: terminal sub-name and also indicates its color |
926 | * @ COLORTERM: terminal sub-name and also indicates its color |
… | |
… | |
1323 | buffer [1] = h; |
1323 | buffer [1] = h; |
1324 | |
1324 | |
1325 | for (unsigned int i = 0; i < w * h; ++i) |
1325 | for (unsigned int i = 0; i < w * h; ++i) |
1326 | buffer [i + 2] = asbuf [i]; |
1326 | buffer [i + 2] = asbuf [i]; |
1327 | |
1327 | |
1328 | XChangeProperty (dpy, parent[0], xa[XA_NET_WM_ICON], XA_CARDINAL, 32, |
1328 | XChangeProperty (dpy, parent, xa[XA_NET_WM_ICON], XA_CARDINAL, 32, |
1329 | PropModeReplace, (const unsigned char *) buffer, 2 + w * h); |
1329 | PropModeReplace, (const unsigned char *) buffer, 2 + w * h); |
1330 | free (buffer); |
1330 | free (buffer); |
1331 | } |
1331 | } |
1332 | else |
1332 | else |
1333 | rxvt_warn ("Memory allocation for icon hint failed, continuing without.\n"); |
1333 | rxvt_warn ("Memory allocation for icon hint failed, continuing without.\n"); |
… | |
… | |
1380 | } |
1380 | } |
1381 | |
1381 | |
1382 | row += rowstride; |
1382 | row += rowstride; |
1383 | } |
1383 | } |
1384 | |
1384 | |
1385 | XChangeProperty (dpy, parent[0], xa[XA_NET_WM_ICON], XA_CARDINAL, 32, |
1385 | XChangeProperty (dpy, parent, xa[XA_NET_WM_ICON], XA_CARDINAL, 32, |
1386 | PropModeReplace, (const unsigned char *) buffer, 2 + w * h); |
1386 | PropModeReplace, (const unsigned char *) buffer, 2 + w * h); |
1387 | free (buffer); |
1387 | free (buffer); |
1388 | } |
1388 | } |
1389 | else |
1389 | else |
1390 | rxvt_warn ("Memory allocation for icon hint failed, continuing without.\n"); |
1390 | rxvt_warn ("Memory allocation for icon hint failed, continuing without.\n"); |
… | |
… | |
1461 | ext_bwidth, |
1461 | ext_bwidth, |
1462 | depth, InputOutput, visual, |
1462 | depth, InputOutput, visual, |
1463 | CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect, |
1463 | CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect, |
1464 | &attributes); |
1464 | &attributes); |
1465 | |
1465 | |
1466 | this->parent[0] = top; |
1466 | this->parent = top; |
1467 | |
1467 | |
1468 | old_width = szHint.width; |
1468 | old_width = szHint.width; |
1469 | old_height = szHint.height; |
1469 | old_height = szHint.height; |
1470 | |
1470 | |
1471 | set_title (rs [Rs_title]); |
1471 | set_title (rs [Rs_title]); |