My laptop does something similar to this, or did until I fixed it.
I always turn off suspend/hibernate on lid close, I hate it, if I want to suspend my laptop I'll suspend it, otherwise just leave things alone. Turns out that on openSUSE Tumbleweed it doesn't bother disabling the touchpad when the lid closes, I suspect because the developers assume it'll just suspend, but when suspend is disabled it means the slight touches between the screen and the touchpad make the touchpad go nuts when the lid is closed, which causes it to open all kinds of things, click everywhere, etc. I've had it open hundreds of file browsers, launch programs with icons on the desktop, and if I leave a program active, it'll start clicking all over it. I even had it install some extensions in Thunderbird before.
To fix it I needed to set an ACPI rule to disable the touchpad when the lid is closed. The notes I made on the process are below:
zypper in acpid
# create /etc/acpi/lid.sh and give it execute permissions
DEVICE="SynPS/2 Synaptics TouchPad"
grep -q closed /proc/acpi/button/lid/LID/state
su user -c "export DISPLAY=:0.0; /usr/bin/xinput set-int-prop '$DEVICE' 'Device Enabled' 8 $?"
# edit /etc/acpi/events/lm_lid
chkconfig acpid on
service acpid restart
# ssh in from another machine
xinput --watch-props "SynPS/2 Synaptics TouchPad"
# open and close the lid, make sure it's switching on and off
Cliff notes: set up an ACPI service to trigger on lid switch changes and launch a script. That script will check the lid switch status, and use xinput to enable or disable "SynPS/2 Synaptics TouchPad" (the name of my laptop's touchpad) accordingly.