[739] in Release_7.7_team

home help back first fref pref prev next nref lref last post

htmlview starts new Mosaic if old might be hidden

daemon@ATHENA.MIT.EDU (Bruce R. Lewis)
Thu Oct 3 14:52:57 1996

Date: Thu, 3 Oct 1996 14:51:50 -0400
From: "Bruce R. Lewis" <brlewis@MIT.EDU>
To: release-team@MIT.EDU

At today's release team meeting we agreed that it's important for
htmlview not to use a Mosaic process already running if that process
might be iconified or hidden behind other windows.  Accordingly, I've
modified htmlview to try to deiconify and raise the Mosaic window using
the xwit program in the outland locker.  If that fails for any reason, a
message is printed and a new browser starts.

htmlview: Mosaic already running but might be hidden...

For those who are interested, here's the pertinent part of the script:

    if $process_exists $mosaic_pid > /dev/null 2>&1; then

        # Only use existing Mosaic if it can be deiconified and raised.
        if `attach -n -h -p outland`/bin/xwit \
          -names "NCSA Mosaic: Document View" > /dev/null 2>&1; then

            # Try to have it open the given URL; exit if successful
            cat > /tmp/Mosaic.$mosaic_pid << EOF
goto
$@
EOF
            kill -USR1 $mosaic_pid && exit 0
            echo "$0: Could not use Mosaic already running..." >&2
        else
            echo "$0: Mosaic already running but might be hidden..." >&2
        fi
    fi

home help back first fref pref prev next nref lref last post