diff --git a/basis/ui/windows/windows.factor b/basis/ui/windows/windows.factor index 1d3212c436..1481287e95 100755 --- a/basis/ui/windows/windows.factor +++ b/basis/ui/windows/windows.factor @@ -285,12 +285,8 @@ SYMBOL: nc-buttons swap [ push ] [ delete ] if ; : >lo-hi ( WORD -- array ) [ lo-word ] [ hi-word ] bi 2array ; -: mouse-wheel ( wParam -- array ) >lo-hi [ sgn neg ] map ; -: mouse-absolute>relative ( lparam handle -- array ) - [ >lo-hi ] dip - "RECT" [ GetWindowRect win32-error=0/f ] keep - get-RECT-top-left 2array v- ; +: mouse-wheel ( wParam -- array ) >lo-hi [ sgn neg ] map ; : mouse-event>gesture ( uMsg -- button ) key-modifiers swap message>button @@ -340,9 +336,7 @@ SYMBOL: nc-buttons >lo-hi swap window move-hand fire-motion ; :: handle-wm-mousewheel ( hWnd uMsg wParam lParam -- ) - wParam mouse-wheel - lParam hWnd mouse-absolute>relative - hWnd window send-wheel ; + wParam mouse-wheel hand-loc get hWnd window send-wheel ; : handle-wm-cancelmode ( hWnd uMsg wParam lParam -- ) #! message sent if windows needs application to stop dragging diff --git a/basis/ui/x11/x11.factor b/basis/ui/x11/x11.factor old mode 100644 new mode 100755 index b5c71bc3fb..b65236d1f9 --- a/basis/ui/x11/x11.factor +++ b/basis/ui/x11/x11.factor @@ -117,7 +117,7 @@ M: world button-up-event } at ; M: world wheel-event - [ dup mouse-event>scroll-direction swap mouse-event-loc ] dip + [ [ mouse-event>scroll-direction ] [ mouse-event-loc ] bi ] dip send-wheel ; M: world enter-event motion-event ; @@ -125,7 +125,7 @@ M: world enter-event motion-event ; M: world leave-event 2drop forget-rollover ; M: world motion-event - [ dup XMotionEvent-x swap XMotionEvent-y 2array ] dip + [ [ XMotionEvent-x ] [ XMotionEvent-y ] bi 2array ] dip move-hand fire-motion ; M: world focus-in-event @@ -146,10 +146,10 @@ M: world selection-notify-event : clipboard-for-atom ( atom -- clipboard ) { - { [ dup XA_PRIMARY = ] [ drop selection get ] } - { [ dup XA_CLIPBOARD = ] [ drop clipboard get ] } + { XA_PRIMARY [ selection get ] } + { XA_CLIPBOARD [ clipboard get ] } [ drop ] - } cond ; + } case ; : encode-clipboard ( string type -- bytes ) XSelectionRequestEvent-target diff --git a/core/vocabs/loader/loader-docs.factor b/core/vocabs/loader/loader-docs.factor index bc57c48a62..ce3b5ea024 100644 --- a/core/vocabs/loader/loader-docs.factor +++ b/core/vocabs/loader/loader-docs.factor @@ -66,7 +66,7 @@ HELP: vocab-roots { $var-description "A sequence of pathname strings to search for vocabularies." } ; HELP: add-vocab-root -{ $values { "path" "a pathname string" } } +{ $values { "root" "a pathname string" } } { $description "Adds a directory pathname to the list of vocabulary roots." } { $see-also "factor-roots" } ; diff --git a/vm/os-unix.h b/vm/os-unix.h index 97b1b39129..b2a1735fd7 100755 --- a/vm/os-unix.h +++ b/vm/os-unix.h @@ -23,6 +23,7 @@ typedef char F_SYMBOL; #define STRNCMP strncmp #define STRDUP strdup +#define FIXNUM_FORMAT "%ld" #define CELL_FORMAT "%lu" #define CELL_HEX_FORMAT "%lx" diff --git a/vm/os-windows.h b/vm/os-windows.h index b12d677af2..af9b75bca5 100755 --- a/vm/os-windows.h +++ b/vm/os-windows.h @@ -20,13 +20,13 @@ typedef wchar_t F_CHAR; #define STRNCMP wcsncmp #define STRDUP _wcsdup +#define FIXNUM_FORMAT "%Id" +#define CELL_FORMAT "%lu" +#define CELL_HEX_FORMAT "%Ix" + #ifdef WIN64 - #define CELL_FORMAT "%Iu" - #define CELL_HEX_FORMAT "%Ix" #define CELL_HEX_PAD_FORMAT "%016Ix" #else - #define CELL_FORMAT "%lu" - #define CELL_HEX_FORMAT "%lx" #define CELL_HEX_PAD_FORMAT "%08lx" #endif diff --git a/vm/utilities.c b/vm/utilities.c index 35fc7ad087..d97b540884 100755 --- a/vm/utilities.c +++ b/vm/utilities.c @@ -44,7 +44,7 @@ void print_cell_hex_pad(CELL x) void print_fixnum(F_FIXNUM x) { - printf(CELL_FORMAT,x); + printf(FIXNUM_FORMAT,x); } CELL read_cell_hex(void)