helloSystem / Menu

Global menu bar written in Qt
43 stars 14 forks source link

Some windows are not in the window list #122

Open louies0623 opened 1 year ago

louies0623 commented 1 year ago

Some windows are not in the window list and cannot be restored after shrinking. VirtualBox_PC-1_01_12_2022_21_44_06

probonopd commented 1 year ago

This is partly intentional: Only application windows should be in that menu, not dialog boxes.

louies0623 commented 1 year ago

This is very inconvenient, and it will be very inconvenient to use it under multiple applications. "Where is the window I just reduced, and why the menu does not appear?" This is a problem that often occurs when I use it.

probonopd commented 1 year ago

The solution would be to set the window type of Wizard/Assistant type applications (like the ones you are showing) to something that gets recognized as a standalone application rather than a dialog box. This needs to be done in those applications, not in Menu.

louies0623 commented 1 year ago

It’s better to have a Dock. If you have time, you can disassemble the Dock operation method of this video. https://youtu.be/2GkoAa5718Y?t=330

probonopd commented 1 year ago

There is still the Dock.app for those who need it.

louies0623 commented 1 year ago

@probonopd Please open this issue: Xfe is not on the list VirtualBox_PC-2_30_12_2022_22_03_23

probonopd commented 1 year ago

These are the X properties of the Xfe window:

% xprop 
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 22, 0
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 22, 0
_NET_WM_DESKTOP(CARDINAL) = 0
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = 
WM_COMMAND(STRING) = { "xfe" }
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
                bitmap id # to use for icon: 0x30002ca
                bitmap id # of mask for icon: 0x30002cb
                window id # of group leader: 0x3000408
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x7, 0x3e, 0x7e, 0x0
_NET_WM_NAME(UTF8_STRING) = "Xfe - /home/user"
_NET_WM_ICON_NAME(UTF8_STRING) = "Xfe - /home/user"
WM_NAME(STRING) = "Xfe - /home/user"
WM_ICON_NAME(STRING) = "Xfe - /home/user"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 0, 0
                program specified location: 0, 0
                user specified size: 800 by 600
                program specified size: 800 by 600
                window gravity: NorthWest
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 2876745
XdndAware(ATOM) = BITMAP
WM_CLASS(STRING) = "xfe", "Xfe"

Does anyone have a clue as to why this code does apparently not get this window?

https://github.com/helloSystem/Menu/blob/d852fc0d418903e03a5950f4f7714839b4b642dd/plugin-windows/windowswidget.cpp#L83-L102

louies0623 commented 1 year ago

VirtualBox_PC-2_01_08_2023_14_38_47 Telegram's appimage is not on the list.

probonopd commented 1 year ago

Please run the xprop command, click on the Telegram window, and post the output here. Thanks!

louies0623 commented 1 year ago
EXECUTABLE_PATH(STRING) = "./AppRun"
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_NET_WM_DESKTOP(CARDINAL) = 0
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = 
_GTK_FRAME_EXTENTS(CARDINAL) = 9, 9, 8, 10
_NET_WM_ICON(CARDINAL) =        Icon (16 x 16):

        Icon (22 x 22):

        Icon (48 x 48):
        (not shown)
        Icon (64 x 64):
        (not shown)
        Icon (128 x 128):
        (not shown)

_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "appimagekit_52478d3e9800170adf66ea125c0cf6db-Telegram_Desktop"
_NET_WM_ICON_NAME(UTF8_STRING) = 
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = "Telegram"
_NET_WM_NAME(UTF8_STRING) = "Telegram"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x1, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x3200008
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                window id # of group leader: 0x3200008
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 165212
WM_CLIENT_MACHINE(STRING) = "Users-VirtualBox"
_NET_WM_PID(CARDINAL) = 2216
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 52428807
WM_CLASS(STRING) = "AppRun", "TelegramDesktop"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 872, 178
                user specified size: 452 by 586
                program specified minimum size: 380 by 480
                window gravity: Static
probonopd commented 1 year ago

I don't see why my code should filter out this window. Maybe someone else knows?