--- ./mount.c.00 2007-02-18 12:26:21.000000000 +0100 +++ ./mount.c 2007-02-18 12:26:41.000000000 +0100 @@ -56,6 +56,7 @@ int txtx1, txty1, txtx2 = 8, txty2 = 40, txty3 = 0; bool withdrawn = TRUE; +bool force_shaped = FALSE; bool sigHUP = FALSE; struct allInfo *aiPtr = 0; @@ -403,7 +404,7 @@ disp = XCreatePixmap(dpy, Root, 64, 64, DefaultDepth(dpy, DefaultScreen(dpy))); /* Install mask or copy background tile */ - if (withdrawn) + if (withdrawn || force_shaped) XShapeCombineMask(dpy, Win[activeWin], ShapeBounding, 0, 0, mask, ShapeSet); else @@ -525,6 +526,8 @@ fprintf(stderr, " -h | -help display this help screen\n"); fprintf(stderr, " -i ignore NFS mounts\n"); fprintf(stderr, " -n wm other than Window Maker\n"); + fprintf(stderr, " -s shaped window even if -n is" + " enabled.\n"); fprintf(stderr, " -display display select target display" " (see X manual pages)\n\n"); exit(0); @@ -535,7 +538,7 @@ int optchar; int disp_set = 0; - while ((optchar = getopt(argc, argv, "hind:")) != EOF) + while ((optchar = getopt(argc, argv, "hinsd:")) != EOF) { disp_set = 0; switch (optchar) @@ -546,6 +549,9 @@ case 'i': ignoreNFS = TRUE; break; + case 's': + force_shaped = TRUE; + break; case 'd': if (!strcmp(optarg, "isplay")) disp_set++; @@ -714,10 +720,33 @@ if (mp->isMounted) { mp->performEject = mp->ejectFlag && (xev->button == Button1); + + if (xev->button == Button3) + { + mp->performEject = 1; + } internalUmount(mp); } else - internalMount(mp); + { + if (xev->button == Button3) + { + /* eject! */ + if (ejectcmd[0] == 0) + internalEject(mp); + else + { + char cmd[256]; + int n = (sizeof(cmd) / sizeof(cmd[0])); + + snprintf(cmd, n, ejectcmd, mp->mountStr); + cmd[n - 1] = '\0'; + newSystem(cmd, mp); + } + } + else + internalMount(mp); + } } else {