I am attempting to understand how Spectacle works. So I read its code. I found the following very strange code in Main.cpp in current master ( 4370c5484972a02497bf4bb479f4cc1586b6924c , https://github.com/KDE/spectacle/blob/4370c5484972a02497bf4bb479f4cc1586b6924c/src/Main.cpp ): } else if (lCmdLineParser.isSet(QStringLiteral("windowundercursor"))) { lCaptureMode = Spectacle::CaptureMode::TransientWithParent; } else if (lCmdLineParser.isSet(QStringLiteral("transientonly"))) { lCaptureMode = Spectacle::CaptureMode::WindowUnderCursor; This seems like a typo. It seems the following code should be: } else if (lCmdLineParser.isSet(QStringLiteral("windowundercursor"))) { lCaptureMode = Spectacle::CaptureMode::WindowUnderCursor; } else if (lCmdLineParser.isSet(QStringLiteral("transientonly"))) { lCaptureMode = Spectacle::CaptureMode::TransientWithParent; Even if this is not typo, please add some comment, which will explain such strange code. Or (better) rename something to help people, who read you code. I am reading code of Spectacle, because I'm trying to capture video from screen in my very unusual scenario, see https://bugs.kde.org/show_bug.cgi?id=412731 if you are interested
Hello Askar, that code is indeed correct. You can think here of a transient just as a window. Note that a popup is also a single window. What this does it maps from the user facing option to the options in the code. For the user a popup is not a different window compared to the parent window hence the mapping from windowundercursor to transientwithparent. I agree it can be confusing and others had the same thoughts as you in the past (compare https://phabricator.kde.org/D23891)