GNOME-like dynamic virtual desktops 1.0#4517
Conversation
transforms windows' virtual desktop system to be more like GNOME
|
In addition to the review below, the primary mod description is "behave like the GNOME desktop environment". Add an explanation for those who are not familiar with GNOME. Even those who do might want to know the specific GNOME aspects that the mod implements. Submission reviewNote: This review was done by Claude, and then refined manually. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. A few things to address before this can be merged — most importantly, this should run as a tool mod rather than be injected into This should be a "mod as a tool", not injected into
The clean fit is the dedicated-process pattern: The background thread isn't joined on unload → crash. HANDLE g_hThread = nullptr; // store the handle
// in Wh_ModInit:
g_hThread = CreateThread(NULL, 0, BackgroundEventThread, NULL, 0, &g_threadId);
// in Wh_ModUninit:
if (g_threadId) {
PostThreadMessage(g_threadId, WM_QUIT, 0, 0);
WaitForSingleObject(g_hThread, INFINITE);
}
if (g_hThread) CloseHandle(g_hThread);This also fixes the currently-leaked thread handle (the COM reference leak in the "no populated desktops" branch. In the Rule 1 loop, while (totalDesktops > g_settings.initial_desktops) {
g_pDesktopManager->RemoveDesktop(desktops.back(), desktops.front());
desktops.back()->Release(); // <-- add this
totalDesktops--;
desktops.pop_back();
}This runs whenever all desktops are empty and there's an excess to trim, which is a normal path (e.g. closing everything), so the leak accumulates over a session. Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
|
transforms windows' virtual desktop system to be more like GNOME
Changelog
If this pull request updates an existing mod, describe the changes below:
Mod authorship
If this pull request introduces a new mod, please complete the section below.
This mod was created by:
Please select the options that best apply. Your selection does not affect the acceptance criteria, but it helps reviewers understand the context of the code and provide relevant feedback.