Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt+Tab doesn't show NPP #6244

Closed
PalashBansal opened this issue Oct 21, 2019 · 10 comments
Closed

Alt+Tab doesn't show NPP #6244

PalashBansal opened this issue Oct 21, 2019 · 10 comments
Labels
enhancement Proposed enhancements of existing features

Comments

@PalashBansal
Copy link
Contributor

Description of the Issue

When a subwindow is opened inside NPP, and we press windows provided shortcut Alt+Tab to switch to other opened application, NPP doesn't come up in options.
This happens only for some subwindows like "Rename Current Tab" or "Close All > Save dialog" opened. If "Preference" dialog is opened, issue doesn't occur.

Steps to Reproduce the Issue

  1. Open either "Rename current tab" by right clicking on new tab(doesn't exist in file system) followed by "Rename" option. OR Keep 2 or more files unsaved and click "Close All" option to get "Save" dialog.
  2. Keep "Alt+Tab" shortcut pressed and see NPP missing.
  3. Switch to some other application.
  4. Again try above step 2. And switching to NPP is not possible.
    Workaround-
    To switch to NPP from taskbar only.

Expected Behavior

"Alt+Tab" should show NPP application always(if NPP is in launched state)

Actual Behavior

NPP doesn't appear in application options from "Alt+Tab"

Debug Information

Seems like issue is easily reproducible for every user, still enjoy-
Notepad++ v7.8 (64-bit)
Build time : Oct 7 2019 - 00:55:55
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 7 Professional (64-bit)
OS Build : 7601.23833
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

@sasumner
Copy link
Contributor

Seems like issue is easily reproducible for every user

Not for me. I can successfully alt+tab back to Notepad++ in any of the above scenarios. Maybe the difference is one of Win7 versus Win10?

Me:

Notepad++ v7.8 (64-bit)
Build time : Oct 7 2019 - 00:55:55
Path : C:.........\Releases\npp.7.8\npp.7.8.bin.x64\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1709
OS Build : 16299.1387
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

PalashBansal added a commit to PalashBansal/notepad-plus-plus that referenced this issue Oct 21, 2019
@Ekopalypse
Copy link
Contributor

It works for me on Windows 7 x64 BUT only one time.
Follow the steps as described,

  • switch to another running application by using alt+tab
  • switch back to npp using alt+tab
  • press alt+tab again -> Npp icon is gone.

PalashBansal added a commit to PalashBansal/notepad-plus-plus that referenced this issue Oct 22, 2019
@chcg chcg added the enhancement Proposed enhancements of existing features label Oct 22, 2019
@PalashBansal
Copy link
Contributor Author

@sasumner
I just checked in my office system(win 10 enterprise), it's working perfectly.
So it's a compatibility issue with Win7 then.
Raised a PR(fix for Win7)- #6252

@donho
Copy link
Member

donho commented Oct 23, 2019

I cannot reproduce it at all.
Any stable way to make it happen?

@Ekopalypse
Copy link
Contributor

Ekopalypse commented Oct 23, 2019

It looks to me that it only affects the rename current tab dialog

To reproduce

  1. open npp and another application ( I used firefox)
  2. open a new tab
  3. right-click on tab and chose Rename

image

keep this dialog open
4. press alt+tab and switch to firefox
5. press alt+tab and switch to npp
6. press alt+tab again -> npp icon is gone.

All other dialogs I tested seem to be ok.
open/save file dialog
shortcut mapper dialog
goto dialog
udl dialog
find dialog
preferences dialog
style configurator dialog
windows dialog
summary dialog
commandline dialog
debug info dialog
about dialog

UPDATE:
when there are two instances of npp running, then it happens even after pressing alt+tab twice.

DEBUG INFO:
Notepad++ v7.8.1 (64-bit)
Build time : Oct 19 2019 - 14:31:15
Path : D:\PortableApps\Npp\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 7 Professional (64-bit)
OS Build : 7601.23934
Plugins : ...

@PalashBansal
Copy link
Contributor Author

I cannot reproduce it at all.
Any stable way to make it happen?

Hi @donho ,
Can you please try to simulate steps in similar configuration mentioned below in bold (latest NPP in Win7)-
Notepad++ v7.8 (64-bit)
Build time : Oct 7 2019 - 00:55:55

Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 7
Professional (64-bit)
OS Build : 7601.23833
Plugins : mimeTools.dll NppConverter.dll NppExport.dll (No extra plugins)

Steps to reproduce-

  1. Start NPP and double click to create new tab (automatically named by NPP as "new 1")
  2. Right click this tab and select option "rename", to open NPP's rename floating dialog, as shown in image attached-
    image
  3. Press shortcut Alt+Tab to find NPP icon missing.
  4. If upto step 3 doesn't reproduce the issue, as Ekopalypse mentioned in above comment-
    switch to another running application by using alt+tab
    switch back to npp using alt+tab
    press alt+tab again -> Npp icon is gone.

@Ekopalypse Can you please mention Debug info from your end, as its sporadically reproducible at your side.
@ashleedawg
#6223 (comment)
As this issue first seen by you, would you like to add something, like steps followed or Debug info., to help reproducing this issue.
I don't have access to my win7 system right now. Will add more details in few hours.

@PalashBansal
Copy link
Contributor Author

It looks to me that it only affects the rename current tab dialog

To reproduce

  1. open npp and another application ( I used firefox)
  2. open a new tab
  3. right-click on tab and chose Rename

image

keep this dialog open
4. press alt+tab and switch to firefox
5. press alt+tab and switch to npp
6. press alt+tab again -> npp icon is gone.

All other dialogs I tested seem to be ok.
open/save file dialog
shortcut mapper dialog
goto dialog
udl dialog
find dialog
preferences dialog
style configurator dialog
windows dialog
summary dialog
commandline dialog
debug info dialog
about dialog

UPDATE:
when there are two instances of npp running, then it happens even after pressing alt+tab twice.

DEBUG INFO:
Notepad++ v7.8.1 (64-bit)
Build time : Oct 19 2019 - 14:31:15
Path : D:\PortableApps\Npp\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 7 Professional (64-bit)
OS Build : 7601.23934
Plugins : ...

@Ekopalypse
Can you try the same in this "Close All" dialog-
image

@Ekopalypse
Copy link
Contributor

Yes, this dialog has the same issue as the rename dialog.

@donho
Copy link
Member

donho commented Oct 23, 2019

@Ekopalypse @PalashBansal
So only on Windows 7 ?

@PalashBansal
Copy link
Contributor Author

@Ekopalypse @PalashBansal
So only on Windows 7 ?

Yes, till now, it looks like only in Win7
sasumner and I tried in Win10 but works fine.
But I am not able to find any documentation from microsoft reporting the same.
https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
In this link too, they mention the issue, but not saying that its specific to Win7

@donho donho closed this as completed in f05fedd Oct 24, 2019
kspalaiologos pushed a commit to kspalaiologos/notepad-plus-plus that referenced this issue Jan 17, 2021
Issue is because of Tool window being used instead of normal window for these 2 dialogs- "Close All" and "Rename"
Known issue already discussed on- https://stackoverflow.com/questions/3760571/showdialog-makes-app-window-disappear-from-windows-alt-tab-list

Excerpt from https://docs.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles -

WS_EX_TOOLWINDOW 0x00000080L	The window is intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE.
DS_MODALFRAME is added for "Close All" dialog, because after making it normal window, it started showing default empty windows file icon.

Fix notepad-plus-plus#6244, close notepad-plus-plus#6252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Proposed enhancements of existing features
Projects
None yet
Development

No branches or pull requests

5 participants