Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7f0402a
version with desktop change issues
Robbson Mar 19, 2026
1a75b7a
Some new features and a bug fix, little refactoring, see changelog
Robbson Mar 20, 2026
b58bee5
Moved changelog to right folder
Robbson Mar 20, 2026
a8df233
added flag to hide app from taskbar for manual pinning
Robbson Mar 20, 2026
1169618
added settings dialog; updated about dialog; some code cleanup
Robbson Mar 20, 2026
ae44ad7
Support more adjustable settings; settings layout fixes; Bump version
Robbson Mar 20, 2026
0c9dc9c
updated Icons render mode to also support selection as well as drag &…
Robbson Mar 20, 2026
c846bf3
improved icon mode, additional settings and layout improvements
Robbson Mar 20, 2026
8dc0f34
Add app logo to README for visual representation
Robbson Mar 20, 2026
2272fa3
prevent bringing windows from other desktops to foreground; added too…
Robbson Mar 20, 2026
a82aef7
prevent bringing windows from other desktops to foreground; added too…
Robbson Mar 20, 2026
ff1705a
removed build number from win 11 version check
Robbson Mar 20, 2026
1467f14
Merge branch 'master' of github.com:Robbson/Switchie
Robbson Mar 20, 2026
7b16982
Make it run on Windows 11 again; add some instantiation fallbacks on …
Robbson Mar 20, 2026
69cdb4d
Todos update
Robbson Mar 20, 2026
6c8606a
Merge branch 'master' of github.com:Robbson/Switchie
Robbson Mar 20, 2026
772e119
Filter out minimized windows; fixed window selection in icon render m…
Robbson Mar 21, 2026
4a8ac8e
Changed version management to have the application manifest as source
Robbson Mar 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
bin/
obj/
prod/
prod/
.vs/
*.sln
*.csproj.user
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Switchie Changelog


## v1.4.3

Changes:
- Changed version management to have the application manifest as source so also the executable is correctly versioned


## v1.4.2

New features:
- Setting to hide application window from Taskbar
- Setting to change opacity of the application

Bug fixes
- Filter minimized windows from list, especially important for the icons render mode
- Clicking on windows in Icons render mode now works reliably when an application has more than one window


## v1.4.0

Bug fixes:
- Get it run on recent Windows 11 version again

Changes:
- Instance creation has now several fallbacks so it should work on several Win 10 and Win 11 versions


## v1.3.3

Changes:
- no longer allow mouse clicks to bring windows from another desktop to foreground
- Added tooltips / infos in the settings dialog for some of the settings which need an explanation


## v1.3.2

New features:
- Icons render mode supports a second row when there isn't enough space in one row
- Add parameters for desktop padding and icon padding in settings dialog

Changes:
- fixing performance properties
- layout improvements in settings dialog
- app versioning increase now less aggressive


## v1.3.1

Changes:
- Icons render mode now also supports selection as well as drag & drop to other desktops
- the context menu now also has some nice icons based on glyhps


## v1.3.0

New features:
- new settings dialog

Changes:
- nicer about dialog

Others:
- removed not used properties and functions


## v1.2.0

Bug fixes:
- Update application size when number of desktops are changed

New features:
- New alternative render mode: Show a list of application icons instead windows
- Save render mode current window position (on request) to registry and restore them from there on startup
- Windows can be brought to front when clicking on them

Others:
- Some refactoring and cleanup
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<img src="src/Resources/icon.png" width="200">

# Switchie
Switchie is a virtual desktop pager for Windows inspired by various Linux-based virtual desktop pagers

Expand Down
11 changes: 11 additions & 0 deletions TODOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# Todos

## Bugs

- Potential crash when the render target is gone (can happen on remote desktops, probably otherwise hard to recreate)


## Improvements

- there could be an option to make the application automatically half transparent when it covers another window
41 changes: 22 additions & 19 deletions src/Core/API/VirtualDesktopAPI-Win11.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,28 +154,31 @@ public interface IApplicationViewCollection

[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("B2F925B9-5A0F-4D2E-9F4D-2B1507593C10")]
[Guid("53F5CA0B-158F-4124-900C-057158060B27")]
public interface IVirtualDesktopManagerInternal
{
int GetCount(IntPtr hWndOrMon);
int GetCount();
void MoveViewToDesktop(IApplicationView view, IVirtualDesktop desktop);
bool CanViewMoveDesktops(IApplicationView view);
IVirtualDesktop GetCurrentDesktop(IntPtr hWndOrMon);
void GetDesktops(IntPtr hWndOrMon, out IObjectArray desktops);
IVirtualDesktop GetCurrentDesktop();
void GetDesktops(out IObjectArray desktops);
[PreserveSig]
int GetAdjacentDesktop(IVirtualDesktop from, int direction, out IVirtualDesktop desktop);
void SwitchDesktop(IntPtr hWndOrMon, IVirtualDesktop desktop);
IVirtualDesktop CreateDesktop(IntPtr hWndOrMon);
void MoveDesktop(IVirtualDesktop desktop, IntPtr hWndOrMon, int nIndex);
void SwitchDesktop(IVirtualDesktop desktop);
IVirtualDesktop CreateDesktop();
void MoveDesktop(IVirtualDesktop desktop, int nIndex);
void RemoveDesktop(IVirtualDesktop desktop, IVirtualDesktop fallback);
IVirtualDesktop FindDesktop(ref Guid desktopid);
void GetDesktopSwitchIncludeExcludeViews(IVirtualDesktop desktop, out IObjectArray unknown1, out IObjectArray unknown2);
void SetDesktopName(IVirtualDesktop desktop, [MarshalAs(UnmanagedType.HString)] string name);
void SetDesktopWallpaper(IVirtualDesktop desktop, [MarshalAs(UnmanagedType.HString)] string path);
void UpdateWallpaperPathForAllDesktops([MarshalAs(UnmanagedType.HString)] string path);
void CopyDesktopState(IApplicationView pView0, IApplicationView pView1);
int GetDesktopIsPerMonitor();
void SetDesktopIsPerMonitor(bool state);
void CreateRemoteDesktop([MarshalAs(UnmanagedType.HString)] string path, out IVirtualDesktop desktop);
void SwitchRemoteDesktop(IVirtualDesktop desktop, IntPtr switchtype);
void SwitchDesktopWithAnimation(IVirtualDesktop desktop);
void GetLastActiveDesktop(out IVirtualDesktop desktop);
void WaitForAnimationToComplete();
}

[ComImport]
Expand All @@ -190,16 +193,16 @@ public interface IVirtualDesktopManager

[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("536D3495-B208-4CC9-AE26-DE8111275BF8")]
[Guid("3F07F4BE-B107-441A-AF0F-39D82529072C")]
public interface IVirtualDesktop : IIVirtualDesktop
{
bool IsViewVisible(IApplicationView view);
Guid GetId();
IntPtr Unknown1();
[return: MarshalAs(UnmanagedType.HString)]
string GetName();
[return: MarshalAs(UnmanagedType.HString)]
string GetWallpaperPath();
bool IsRemote();
}
}

Expand All @@ -212,17 +215,17 @@ public class WindowsVirtualDesktop : IWindowsVirtualDesktop
public IIVirtualDesktop ivd { get; set; }
public WindowsVirtualDesktop() { }
public WindowsVirtualDesktop(IIVirtualDesktop desktop) { this.ivd = desktop; }
public void MakeVisible() => _windowsVirtualDesktopManager.VirtualDesktopManagerInternal.SwitchDesktop(IntPtr.Zero, (WindowsVirtualDesktopAPI.IVirtualDesktop)ivd);
public void MakeVisible() => _windowsVirtualDesktopManager.VirtualDesktopManagerInternal.SwitchDesktop((WindowsVirtualDesktopAPI.IVirtualDesktop)ivd);
public IWindowsVirtualDesktop FromIndex(int index) => new WindowsVirtualDesktop(_windowsVirtualDesktopManager.GetDesktop(index));

public int Count
{
get => _windowsVirtualDesktopManager.VirtualDesktopManagerInternal.GetCount(IntPtr.Zero);
get => _windowsVirtualDesktopManager.VirtualDesktopManagerInternal.GetCount();
}

public IWindowsVirtualDesktop Current
{
get => new WindowsVirtualDesktop((IIVirtualDesktop)_windowsVirtualDesktopManager.VirtualDesktopManagerInternal.GetCurrentDesktop(IntPtr.Zero));
get => new WindowsVirtualDesktop((IIVirtualDesktop)_windowsVirtualDesktopManager.VirtualDesktopManagerInternal.GetCurrentDesktop());
}

public void MoveWindow(IntPtr hWnd)
Expand Down Expand Up @@ -277,10 +280,10 @@ public WindowsVirtualDesktopManager()

public WindowsVirtualDesktopAPI.IVirtualDesktop GetDesktop(int index)
{
int count = VirtualDesktopManagerInternal.GetCount(IntPtr.Zero);
int count = VirtualDesktopManagerInternal.GetCount();
if (index < 0 || index >= count) throw new ArgumentOutOfRangeException("index");
WindowsVirtualDesktopAPI.IObjectArray desktops;
VirtualDesktopManagerInternal.GetDesktops(IntPtr.Zero, out desktops);
VirtualDesktopManagerInternal.GetDesktops(out desktops);
object objdesktop;
desktops.GetAt(index, typeof(WindowsVirtualDesktopAPI.IVirtualDesktop).GUID, out objdesktop);
Marshal.ReleaseComObject(desktops);
Expand All @@ -291,8 +294,8 @@ public int GetDesktopIndex(WindowsVirtualDesktopAPI.IVirtualDesktop desktop)
{
int index = -1;
Guid IdSearch = desktop.GetId();
VirtualDesktopManagerInternal.GetDesktops(IntPtr.Zero, out WindowsVirtualDesktopAPI.IObjectArray desktops);
for (int i = 0; i < VirtualDesktopManagerInternal.GetCount(IntPtr.Zero); i++)
VirtualDesktopManagerInternal.GetDesktops(out WindowsVirtualDesktopAPI.IObjectArray desktops);
for (int i = 0; i < VirtualDesktopManagerInternal.GetCount(); i++)
{
desktops.GetAt(i, typeof(WindowsVirtualDesktopAPI.IVirtualDesktop).GUID, out object objdesktop);
if (IdSearch.CompareTo(((WindowsVirtualDesktopAPI.IVirtualDesktop)objdesktop).GetId()) == 0)
Expand Down Expand Up @@ -320,4 +323,4 @@ public void PinApplication(IntPtr hWnd)
}
}

}
}
Loading