From 8a24d1b25af2f069c53343bf9e38ff0a972e8ea4 Mon Sep 17 00:00:00 2001 From: Alexander Iljin Date: Sat, 20 Jan 2018 22:10:02 +0100 Subject: [PATCH] windows.dropfiles[-docs]: remove unnecessary symbol --- basis/windows/dropfiles/dropfiles-docs.factor | 2 +- basis/windows/dropfiles/dropfiles.factor | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/basis/windows/dropfiles/dropfiles-docs.factor b/basis/windows/dropfiles/dropfiles-docs.factor index 661f8215dd..1091001347 100644 --- a/basis/windows/dropfiles/dropfiles-docs.factor +++ b/basis/windows/dropfiles/dropfiles-docs.factor @@ -33,7 +33,7 @@ $nl "By default, WM_DROPFILES doesn't work either, because the necessary window messages are filtered out from the queue, but it is possible to configure the filters and make it work, see " { $link init-message-filter } "." ; HELP: init-message-filter -{ $description "Call " { $snippet "ChangeWindowMessageFilter" } " to allow the window messages necessary for file dropping pass through the filters. This will have a process-wide effect, and will only be called once (when " { $link init-message-filter-done? } " is " { $link POSTPONE: f } ")." +{ $description "Call " { $snippet "ChangeWindowMessageFilter" } " to allow the window messages necessary for file dropping pass through the filters. This will have a process-wide effect, and will only be called once." $nl "The API function is only available since Windows Vista, and is not needed in earlier versions. On Windows XP the missing function will cause an exception on the first call, which will be suppressed, and no more calls will be made." } { $notes "It is generally preferrable to use " { $snippet "ChangeWindowMessageFilterEx" } ", because it has a per-window-handle effect, thus gives a more fine-grained security control. Unfortunately, the " { $snippet "Ex" } "-version is only available since Windows 7, and in any case the " { $link add-wm-handler } " has global effect for all Factor native windows, so it's not like we are exposing any additional code to potential exploitation." } ; diff --git a/basis/windows/dropfiles/dropfiles.factor b/basis/windows/dropfiles/dropfiles.factor index 0cf62c0298..1080dbbebf 100644 --- a/basis/windows/dropfiles/dropfiles.factor +++ b/basis/windows/dropfiles/dropfiles.factor @@ -35,11 +35,9 @@ IN: windows.dropfiles : do-once ( guard-variable quot -- ) dupd '[ t _ set-global @ ] [ get-global ] dip unless ; inline -SYMBOL: init-message-filter-done? - ! Ignore the errors: on WinXP the function is missing, and is not needed. : init-message-filter ( -- ) - init-message-filter-done? [ + \ init-message-filter [ [ (init-message-filter) ] [ drop ] recover ] do-once ; -- 2.34.1