This has been an ongoing issue for me. Not all Linux desktop environments respond the same to dual monitor hardware configurations, and not all of them function well when it involves a laptop.
For years I have favored KDE’s desktop workspace, partially because of its superior set of options for dual monitors. You can set the primary monitor, tell KDE to follow the mouse when starting an app so that it opens on the right screen, and even configure separate desktops and widgets for each screen.
Gnome automatically detects dual monitors like other desktops, and it seems to work very well. One limitation, however, is that the Nautilus-powered desktop duplicates the same wallpaper on each screen. The only other option is to get a wallpaper wide enough to stretch across both screens. If the monitors are not the same size, you are out of luck.
XFCE handles dual monitor setup very well. It has the auto-configuration of Gnome and also allows for two or more different wallpapers like KDE. What it does not have are some of the more intricate settings only found in KDE, such as window placement support, and “show unmanaged windows on…”
With that in mind, it would seem KDE is the clear winner, and for my desktop computer, it always was. With a laptop, however, problems arise. When the connection is not permanent, KDE goes haywire. Connect an external monitor, setup an extended desktop, and then disconnect the monitor, and KDE will not go back to single monitor settings correctly. Sometimes, the Plasma workspace will become unresponsive, forcing you to use a workaround that involves adding a new activity, switching to it, and then switching back.
With the new Ubuntu Unity, Gnome, and XFCE, switching from one monitor to two and then back to one does not seem to cause the same problems. They detect the changes and switch. Right now on my laptop, I am currently running an experimental desktop that combines Ubuntu’s Unity window manager, XFCE’s desktop (for dual wallpapers), and (mostly) KDE applications. This is, of course, just experimental, but it also highlights the flexibility and diversity you can get out of Linux to make it work exactly how you want it.