Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Alt-tab now unusable (IN-43727)

Discussion in '2023.2 Beta' started by laurentlavigne, Jun 13, 2023.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,434
  2. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    +1 to this.
     
    laurentlavigne and MrGameDeve like this.
  3. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,095
    Even on a very modern Mac, there's a lag from Unity and back to unity when using Command + Tab, that doesn't exist between any other apps, many of which have vastly bigger memory footprints.
     
    laurentlavigne and MrGameDeve like this.
  4. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Bigger lies have never been spread. Please undo this 'improvement' that completely breaks alt tab.
    • Editor: Changed to title bars on Windows for editor. Improving upon the existing title bar feature by adding to it.
     
  5. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,125
    We're listening to our valued users
    This sucks!​
    We value your feedback! We hear you!
    Please, this harms usabili-​
    This change is an improvement
    Wait wha-​
    Please continue to submit your ideas to the roadmap website <3
     
  6. Saniell

    Saniell

    Joined:
    Oct 24, 2015
    Posts:
    205
    Then they act all surprised when people start acting aggressively lol
     
    laurentlavigne and Unifikation like this.
  7. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,195
    Making each windows become its own instance is the most annoying feature that was cause me to avoid paint.net in earlier version. Never thought unity or anyone would repeat the same mistake
     
  8. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    upload_2023-7-5_14-59-33.png

    Just deal with it, its suddenly a quirk of windows.
     
  9. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,095
    has Unity ever done anything wrong, or even slightly sub-optimally?

    Of course not! Silly me.
     
  10. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,195
    This is seriously disappointed. Should we report it as a bug and upvote it
     
    Ruslank100 and laurentlavigne like this.
  11. Armynator

    Armynator

    Joined:
    Feb 15, 2013
    Posts:
    68
    I like the native windows and title bars. The workflow is finally (almost) exactly the same on Windows and Linux.

    However, the real problem I see is the weird behaviour: why on earth is any sub-window always above the actual editor?
    You can't minimize the main editor window without minimizing all sub-windows as well.

    The idea of native windows itself is nice, but the execution is very bad. I'd love to keep bigger windows like ShaderGraph separated, but what's the point if it always stays on top of every other editor window, including the main editor itself when tabbing in or out of it?
    It's definitely unpolished and needs more work, but completely reverting it would be the wrong decision in my opinion.


    We usually have 3 projects open at once. Even before this change it was very bad if used on a single desktop.
    I highly recommend using multiple desktops, one for every project with separated task bars. This works very well on Windows 10/11 and Ubuntu.


    Another sidenote about the screenshot: on Ubuntu you don't have this problem. Alt+Tab works exactly as shown on your screenshot, while Win+Tab cycles through app instances, excluding the sub-windows.
    I'm not saying you should throw Windows out of the window, but maybe you should consider learning how to use Linux/Ubuntu if you care so much about an optimal workflow.
    Of course you still need Windows for publishing and testing, but if you can afford a dedicated Linux workstation (or can live with the downsides of dual-boot), it's really worth the effort in the long run.
    Seriously, even without coding the amount of customization options of the Ubuntu desktop is insane.
     
    Ruchir, mariandev and LooperVFX like this.
  12. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,434
    don't talk about doing something, do it.
     
  13. Ruslank100

    Ruslank100

    Joined:
    Apr 11, 2018
    Posts:
    46
    I just look at the amount of space wasted by each window by the native title bar, and even more space wasted with the duplicate Unity title bar, I am horrified. How come such changes passed
    I guess I'll stay on 2022.1 for a long time now
     
    Unifikation likes this.
  14. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,960
    Did you both miss the part where someone already did a bug report and Unity replied it's a Windows quirk and they won't fix it?
    Submitting bug reports is about as useful as starting online petitions or something.
     
    Unifikation and Thaina like this.
  15. Saniell

    Saniell

    Joined:
    Oct 24, 2015
    Posts:
    205
    Windows quirk? Damn, you'd think work of a UX developer would be dealing with these quirks, but as it turns out, it actually about doing whatever you want and ignoring any feedback cuz it's a bit complicated to do it the right way. Nice attitude. And all that while .NET team rewrites half the engine to bring .NET Core, what a joke
     
    Sluggy, Unifikation and Ruslank100 like this.
  16. Gladyon

    Gladyon

    Joined:
    Sep 10, 2015
    Posts:
    389
    I agree so much!!
    All my bug reports have been classified as "not a bug" "won't fix" or "duplicated" (of an already fixed bug of course...).
    Note that in the last case, it wasn't a duplicate but anyway it wasn't such a serious bug after all, I could write a 4 lines of code script which had 100% chances to produce a crash, a perfectly normal feature I guess...
    Fortunately they eventually fixed it, I guess someone at Unity stumbled on the bug by chance.

    I have stopped submitting bugs when they rejected a bug report without reading it because it was made on a "too old version" (released less than 6 month before...).
    My time is better used finding workarounds rather than hoping Unity will fix something.
    Which is why I really like when they add features in packages where we can fix the code ourselves.
     
    Unifikation likes this.
  17. Frog556fb2

    Frog556fb2

    Joined:
    Apr 27, 2019
    Posts:
    14
    Please revert this for anything other than shader graph and similar windows. This is really unusable and looks terrible. At least this shouldn't be the default behavior.
     
    Ruslank100 and Unifikation like this.
  18. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    181
    i agree this is a major usability issue for countless developers that rely on years of workflows and "muscle memory" with the previous behaviour in mind. now, there is good and bad news as to where this issue originated and how this can be resolved to satisfy the most possible workflows and developers with a cohesive and consistent user experience.

    the bad news:

    • alt + tab in microsoft windows has been unusable for "per app" switching since windows 7. it's been a "per window" switcher for over a decade. no matter how many windows are open in that app. (assuming the app is actually reporting its child windows to the operating system as expected. also edge browser receives some special treatment with tabs.) microsoft intended to resolve some of this with the since cancelled (or delayed) windows "sets" feature.

    • strictly speaking, as important as the limited legacy functionality is to existing workflows, this issue is not a bug to report to unity (and i don't believe they will ever see it as a bug.) It may seem blurry where the onus is as the perception is that "everyone knows that microsoft doesn't care and so you the application developer should figure out a way to fix it". many developers do make attempts, setting a precedent that maintains this perception. it still remains at the core a feature to request of microsoft to bring back an option to restore how alt-tab used to work in windows xp and older (per application switching) in line with what other operating systems provide. at most this is asking unity to try and fix and massage what is really a microsoft issue (as many developers do --attempting to rectify microsoft's omissions and limitations for them in countless one-offs that result in fragmented workflows that vary in every application, further delaying and shielding microsoft from receiving the brunt of the feedback and doing something about it.)

    • this is a non-issue on mac os and linux (ubuntu) as their window managers provide features "out of the box" to use alt tab or similar shortcuts to switch "per application" and not just "per window". the unity editor is finally in line with how microsoft intends for this to work (albeit in a regressed state.) previously the limitation of microsoft windows' task switcher only being able to switch individual windows (and not whole apps) was being sidestepped by unity's lack of child window integration with the microsoft windows api.

    the good news:

    • this unity update enables or improves multiple workflows: individual window switching, window snapping, virtual desktops / multiple workspaces, support for many accessibility features, 3rd party window manager enhancements like nurgo tidytabs, stardock groupy, (both provide windows "sets" like tabs to any app) and many others, are now all possible with unity editor. these features did not previously work on any unity editor window but the "main" window.
     
  19. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,434
    I never saw any such request so I browsed through your links and the demand looks very weak.

    Anyway, thanks for sharing the fix-hacks.
    To save people some time, you can skip the windows xp regedit hack, yes the insanity stops but you lose snapshot and mouse selection.

    Bad policy on Unity's design team part to -again- break user workflow without an option or forum thread assessing demand.
     
    LooperVFX, Thaina and Unifikation like this.
  20. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    163
    Hi there, I work on Unity's editor design team. The decision was made based on a combination of external requests (as Landon very helpfully pointed out above) as well as internal initiatives for reducing our editor tech debt.
    The code involved for us to be able to manage multiple windows while sidestepping the built-in management of Windows OS was quite large, and was very time and effort intensive for us to manage.
    Internally, we determined that the benefits of this change (as Landon notes above, including window snapping, accessibility support, integration with virtual desktop and 3rd party organization apps) would be able to outweigh the temporary frustration grating against the user's muscle memory. We don't make decisions like this lightly, as the ability for our users to work smoothly is a high priority. We are reviewing comments and reports from you all, and most likely any bug that was filed as "won't fix" was passed on to the design team to save as a design ticket, as the code itself is working as expected.
     
  21. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,494
    I presented the solution in another thread but I'll repeat it here too: you simply add the WS_EX_TOOLWINDOW flag to the CreateWindowEx() method when the window is being created and it will never show up on the taskbar or in the alt-tab interface.

    https://learn.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles

    Edit: I've confirmed on my end that it is present in Windows 10 and 11. Here are some screenshots for the people who don't work with code. If you want to try it out yourself locally just create a "Windows Desktop Application" project within Visual Studio 2022 and change the InitInstance() method to use the following code:

    Code (csharp):
    1. BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
    2. {
    3.    hInst = hInstance; // Store instance handle in our global variable
    4.  
    5.    HWND hWnd = CreateWindowEx(WS_EX_TOOLWINDOW, szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
    6.       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);
    7.  
    8.    if (!hWnd)
    9.    {
    10.       return FALSE;
    11.    }
    12.  
    13.    wcscpy_s(szTitle, MAX_LOADSTRING, L"My Window Test");
    14.    SetWindowText(hWnd, szTitle);
    15.  
    16.    ShowWindow(hWnd, nCmdShow);
    17.    UpdateWindow(hWnd);
    18.  
    19.    return TRUE;
    20. }

    upload_2023-7-10_20-23-41.png

    upload_2023-7-10_20-24-11.png

    Edit: Here's a variant that retains the normal appearance of the title bar. It accomplishes this by creating a hidden window to be the owner of the real window.

    Code (csharp):
    1. BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
    2. {
    3.     hInst = hInstance; // Store instance handle in our global variable
    4.  
    5.     // Create a hidden window
    6.     HWND hWndHidden = CreateWindowEx(WS_EX_TOOLWINDOW, szWindowClass, L"Hidden Window", WS_POPUP,
    7.         0, 0, 0, 0, nullptr, nullptr, hInstance, nullptr);
    8.  
    9.     // Create the main window with the hidden window as its owner
    10.     HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
    11.         CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, hWndHidden, nullptr, hInstance, nullptr);
    12.  
    13.     if (!hWnd)
    14.     {
    15.         return FALSE;
    16.     }
    17.  
    18.     ShowWindow(hWnd, nCmdShow);
    19.     UpdateWindow(hWnd);
    20.  
    21.     return TRUE;
    22. }

    upload_2023-7-11_8-39-32.png
     
    Last edited: Jul 11, 2023
  22. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    The floating windows with the title bar look so bad. Please change it back to the way it was in 2022.
     
  23. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,095

    Given the above, do you think you could, at the very least, provide a switch within the editor that enables this eminently reasonable and easy workaround of @Ryiah suggestion, such that you can maintain all the ways it's now according with Windows by default?

    In other words, nothing changes for most users for whom this mess of windows in Windows isn't a problem. The others can then enable this switch that reboots the Unity Editor into a mode/way that at least makes app switching somewhat sensible in Windows.
     
  24. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,342
    Note that it's not grating against muscle memory - it's degrading workflow. We now have a choice - do we want to be able to switch back to the code editor with a single keyboard press, or do we want to have floating windows in Unity?

    The "tech debt" you had was a necessary feature in order to have a good workflow for the 95% or so of your users that's on Windows. I never cared about window snapping! I do care about not losing my flow every time I want to switch to the code editor because there's now three-four different Unity sub-windows that Windows has added to the alt-tab menu.

    I mean sure this is mostly on Windows being incredibly bad at understanding what their UI should do, but you kinda have to make software for the operating system you're shipping on.
     
  25. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Adding insult to the death, If you have multiple projects open, it's even worse.
     
  26. Saniell

    Saniell

    Joined:
    Oct 24, 2015
    Posts:
    205
    You make decisions like this all the time on a wim, like how you removed "Recompile After Finished Playing", because there were some bugs associated nobody wanted to fix. I don't believe you for a second, I feel like what you want is to get rid of the code you don't want to fix and rationalize it somehow.
     
  27. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,503
    alt tab is unusable right now..
     
  28. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Thanks for your in depth reply! Do hope threads like this can persuade you to revisit some topics, and for example remove the titlebars and alt-tab-ability of subwindows. Although we cant know the technical implications, that would already alleviate a lot of our issues.
     
    Unifikation likes this.
  29. bonickhausen

    bonickhausen

    Joined:
    Jan 20, 2014
    Posts:
    115
    it is absolutely terrible if you have multiple projects open.

    please revert this. it was working just fine before. dont push an update out if it's going to make the product worse.
     
    ConcernedDev, mgear and Unifikation like this.
  30. FredTuna

    FredTuna

    Joined:
    Dec 28, 2016
    Posts:
    16
    I agree with the general sentiment that this is such a step backwards in minute to minute usability of Unity and an IDE. The way it pollutes the task bar and alt-tab menu without any benefit in return makes no sense. I get wanting to have floating windows behave natively in Windows but at least take the time to complete the feature please.

    As suggested by Ryiah above, there is a way to do this.

    On my end, I made a script that can be used with AutoHotkey to bind a hotkey to toggle the Window type of the currently active window to appear or not in the taskbar/alt-tab menu. Using this script, every time I open Unity, I select each floating window, use the hotkey and the floating window will now disappear from the taskbar and the alt-tab menu. It also keeps the window snapping features native to Windows. This is done by toggling the WS_EX_APPWINDOW window extended style flag

    It's annoying that I have to manually do this for three floating windows every time I open Unity and for each new floating window I create but it's better than stumbling my way through the alt tab menu when changing back and forth between Unity and IDE. Given how simple a 3rd party script is to change the behaviour in a positive way for many people, I really wonder why Unity does not add a setting to apply this behaviour automatically for every new floating window.

    Anyways. Here is the AutoHotkey script for anyone that wants to use it. You will need to download AutoHotkey to use this script. In my case, I assigned Ctrl+WindowsKey+A as the hotkey to toggle the window behaviour. You can look here to change the hotkeys https://www.autohotkey.com/docs/v2/Hotkeys.htm:

    Code (Boo):
    1. ^#a::
    2. {
    3. active_id := WinGetID("A")
    4. WinSetExStyle "^0x40000", "ahk_id " active_id
    5. }
     
    Last edited: Jul 21, 2023
    ConcernedDev, Thaina, mgear and 3 others like this.
  31. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    247
    After using the new Unity for some time, have to say this new multi-window thing is a net negative. They really should make it an option. I can see some people using this to improve multi-monitor use-cases, but for the rest of us this is just messy.
     
    ConcernedDev and Thaina like this.
  32. Fuzzel_

    Fuzzel_

    Joined:
    Nov 6, 2018
    Posts:
    11
    What I don't understand in all this: Even if they are now native windows, why add the windows title bar? Windows easily allows apps to decide if you want the native title bar or draw a drag area + close button yourself (which it previously did). Removing tech debt is all fine and dandy, but you don't have to to use the native title bar which takes up so much space and just from a aesthetics standpoint looks ugly with the native "tab title bar" below it, essentially having a duplicate.
     
    Last edited: Aug 6, 2023
  33. ConcernedDev

    ConcernedDev

    Joined:
    Aug 12, 2023
    Posts:
    7
    So you’re really not going to fix this?
     
  34. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,960
    I agree. Maybe better examples exist, but those seem rather weak. The "bug" on the issuetracker has 0 votes. (but somehow votes matter?...)

    I think the real answer is, despite Unity supposedly rewriting their UI code in the last 10 years, it's still such a S***-show they'd still rather use anything other than their own stuff when they can.

    Also, what is this weak-ass "reduce our tech debt and hope for the best" bs? Okay, sure, if you really don't want to be handling your windows, then re-design the editor in a way to make the change make sense (I don't know, maybe there is a different UI paradigm where this change works?) and then make this change.

    Because otherwise, you're going to change this, then the people that made this change will get fired / leave the company (because that's what happens with Unity) then the new hires will go all "oooh, we can't touch that code that was written before we came aboard, we don't dare break people's workflows".

    It's the classic Unity move:

    Unity: Here's a change, F*** your workflows.
    Everyone: Uhhh, wtf is this, maybe change it back?
    **** Crickets **** <- (this is where we are currently)
    Everyone: Hello?
    Unity: How DARE YOU? There are people relying on the new workflow, we can't make such a change this lightly WHEN PEOPLE ARE AFFECTED.
     
    Last edited: Aug 15, 2023
  35. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    516
    Last edited: Aug 14, 2023
  36. ConcernedDev

    ConcernedDev

    Joined:
    Aug 12, 2023
    Posts:
    7
    You kid but they’ll wheel out another sacrificial employee to write something like this.
     
    Unifikation likes this.
  37. ConcernedDev

    ConcernedDev

    Joined:
    Aug 12, 2023
    Posts:
    7
  38. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    516
    Wow, I didn’t know that ;). You could try and write meaningful messages instead of this nonsense all the time. You really look like a troll.
     
  39. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    220
  40. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,434
    I don't mind (and maybe don't care much) about the aesthetic. All I care about is readability and information density. the new UI is meh but the mockup is also meh in both aspects. What I see superior in the mockup is the inspector back and fwd arrows and I'm surprised this didn't make it.

    Anyway back on track with the original topic.

    @alexandral_unity thanks for diving in the shark tank. I appreciate you taking one for the team.
    That was the balm, now the harsh reality:

    Landon's show near zero support for this concept.

    Unity is in the business of easing our burden not increasing it for your convenience.

    Ryiah gave you the solution a month ago, no word from Unity dev. That's not a way to treat a community that bends over backward to work with you on this.

    Wrong analysis. It's not user muscle memory but efficiency.
     
    Last edited: Sep 19, 2023
    WhatRU, mgear, thelebaron and 8 others like this.
  41. UnrealDude1

    UnrealDude1

    Joined:
    Sep 14, 2023
    Posts:
    7
    Worst decision yet
     
  42. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,125
    Guess you haven't checked the announcements recently
     
    Ryiah, nehvaleem, Rennan24 and 7 others like this.
  43. FunAndGameslol

    FunAndGameslol

    Joined:
    Oct 5, 2023
    Posts:
    3
    Any update?
     
  44. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,960
    What kind of update are you expecting?
     
  45. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,494
    It's an intentional design decision that won't be altered even though it's trivial to do so. It's just another example of what happens when you have a company that doesn't dogfood their own engine and thus doesn't understand the pain points of using their UIs.
     
    Last edited: Oct 6, 2023
  46. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    181
    Good news. It appears there will be a configurable option for the best of both workflows in upcoming alpha and beta releases :)
    • Editor: The Windows editor now hides secondary windows from the taskbar and alt+tab menu. This can be toggled via the "General > Show All Windows In Taskbar" option in Editor Preferences. (UUM-52117)
      Fixed in 2023.3.0a11.
    https://unity.com/releases/editor/alpha/2023.3.0a10
     
  47. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,342
    Nice!
     
  48. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,195
    AT LAST! this is the first thing that make me felt like things will be better after the replacement of CEO
     
    nehvaleem likes this.
  49. Saniell

    Saniell

    Joined:
    Oct 24, 2015
    Posts:
    205
    Can somebody tell me use case for having "all windows in taskbar"?
     
  50. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,195
    Actually in the recent version of both windows and macos, it seem both OS try to encourage the combine taskbar system to group multiple windows. People and application are in transition to that kind of system and I can see unity also try to go in that direction, making the app windows become native windows under the same flow

    They try to force educate people to use multiple tab modifier, for switch app and switch windows in the same app, which align with this new system

    But it seem the implementation in unity is totally wrong and not even usable as we can see. There are also many people hate the combine taskbar system (me too). Not to mention windows 11 is seriously so broken to the point that they can't install in older computer many used to develop unity currently so this new change has no one really love it