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

onlyShowContextMenu opens a white box on left click #377

Open
wardy484 opened this issue Sep 29, 2024 · 1 comment
Open

onlyShowContextMenu opens a white box on left click #377

wardy484 opened this issue Sep 29, 2024 · 1 comment
Labels
awaiting-input Further information is requested bug Something isn't working windows

Comments

@wardy484
Copy link

wardy484 commented Sep 29, 2024

What were you trying to do?

I'd like to have nothing happen (or the context menu appear) when left clicking the app in my system tray.

What happened?

When using onlyShowContextMenu the app window did not appear, however a small whitebox did pop up.

image

How to reproduce the bug

public function boot(): void
    {
        Window::open();
        
        MenuBar::create()
            ->onlyShowContextMenu()
            ->withContextMenu(
                Menu::new()
                    ->label('My Application')
                    ->separator()
                    ->link('https://nativephp.com', 'Learn more…')
                    ->separator()
                    ->quit()
            );
    }

Package Versions

nativephp/electron: 0.7.3, nativephp/laravel: 0.5.7, nativephp/php-bin: 0.5.4

PHP Version

8.3.11

Laravel Version

11.9

Node Version

22.9.0

Which operating systems have you seen this occur on?

Windows

OS version

Win 11 Version 24H2 (OS Build 261000.1742

Notes

Hopefully nothing specific but could be worth noting this is on an arm 64 windows device so is probably running through emulation. I will attempt to test on x64 at some point but I suspect this will persist.

@wardy484 wardy484 added the bug Something isn't working label Sep 29, 2024
@simonhamp
Copy link
Member

@wardy484 It's almost certainly running through some kind of emulation on some level as we don't have an ARM build of our internal static PHP binaries for Windows yet. Granted, that may not be the issue here.

Is it possible for you to provide a demo repo that I can easily spin up to try to debug this?

@simonhamp simonhamp added the awaiting-input Further information is requested label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-input Further information is requested bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

2 participants