From 8564fa904b1d343f13c5de6c57832d10b45f46fe Mon Sep 17 00:00:00 2001 From: inkeliz Date: Mon, 27 Nov 2023 16:09:05 +0000 Subject: [PATCH] [io, app] Remove unused code Signed-off-by: inkeliz --- app/internal/windows/windows.go | 10 +--------- app/os_windows.go | 12 +++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/app/internal/windows/windows.go b/app/internal/windows/windows.go index cacc75af3..9fac0ec37 100644 --- a/app/internal/windows/windows.go +++ b/app/internal/windows/windows.go @@ -130,8 +130,6 @@ const ( CW_USEDEFAULT = -2147483648 - ERROR_ALREADY_EXISTS = 183 - GWL_STYLE = ^(uintptr(16) - 1) // -16 GCS_COMPSTR = 0x0008 @@ -144,8 +142,7 @@ const ( CFS_POINT = 0x0002 CFS_CANDIDATEPOS = 0x0040 - HWND_TOPMOST = ^(uint32(1) - 1) // -1 - HWND_BROADCAST = 0xFFFF + HWND_TOPMOST = ^(uint32(1) - 1) // -1 HTCAPTION = 2 HTCLIENT = 1 @@ -339,11 +336,6 @@ const ( LR_MONOCHROME = 0x00000001 LR_SHARED = 0x00008000 LR_VGACOLOR = 0x00000080 - - FILE_MAP_WRITE = 0x0002 - FILE_MAP_READ = 0x0004 - - PAGE_READWRITE = 0x00000004 ) var ( diff --git a/app/os_windows.go b/app/os_windows.go index 5518a5c49..e5963a622 100644 --- a/app/os_windows.go +++ b/app/os_windows.go @@ -924,20 +924,14 @@ func (w *window) onOpenURI(uri string) bool { return false } - found := false for _, scheme := range strings.Split(schemesURI, ",") { if u.Scheme == scheme { - found = true - break + w.ProcessEvent(transfer.URLEvent{URL: u}) + return true } } - if !found { - return false - } - - w.ProcessEvent(transfer.URLEvent{URL: u}) - return true + return false } func convertKeyCode(code uintptr) (key.Name, bool) {