Hi Leee
... Similarly, Xorg tried to "stretch" my desktop across the builtin screen and the external monitor, even though I had the lid closed. ...
I had the same issue. The problem was the window manager would
start opening apps on the laptop screen when it felt there wasn't
enough empty space on the main monitor. Then I would have to mouse
over to the app and drag it back to the main monitor.
I solved it by detecting the presence of the external monitor in .xsession
and copy a special xorg.conf to /etc/X11. I start a second copy of the
window manager on the laptop screen. You can move the mouse cursor
between the screens but apps can't be dragged to the other screen.
You can only have the wbar on one screen but the desktop popup menu
works on both screens. Best of all, with 2 window managers, each one
only launches apps on its own screen.
I've attached copies of xsession and xorg.conf.2monitors in case you are
interested. I also attached a script for turning the touchpad On/Off.
Set TouchpadName to match your hardware.
PropertyName should not need to be changed.
The script contains explanations.