Break large inserts into smaller chunks by successively halving the
chunk, instead of successviely peeling off a small part. Also, avoid
traversals and re-traversals of a long line while checking and
breaking up lines.
original commit: ac5961eae9a4d5c24f78e1d8f7d531c7f7881783
by splitting them up and using separate events so other work
can also happen while the insertion is going on.
This change also changes the queue-callback for IO insertion
to be a low-priority callback. This should have been the case
before, I think, but it is a bit surprising it wasn't and so
this may also cause other problems
closes PR 14851
original commit: 8027e4872ad53ec74f43de033bae6e387b57da02
Button-click handling foir `choice%` could continuously
re-queue an event that isn't handled by default, leading
to stack overflow and a crash.
original commit: c7688818fafb478c5ed4afa4c9772c86201386ad
Fix various configuration problems, and make the build work with 3m
(probably for the first time).
The repairs include corrections for the manual link table, but also
switch Cygwin to relying on normal DLL exports, instead, to work
properly with the FFI.
The `--enable-shared` comfiguration option is no longer required for
Cygwin. When it is used, the `gracket` launcher does not work right,
because the Cygwin DLL is in the "bin" directory and "gracket.exe" is
in the "lib" directory. Along similar lines, stand-alone executables
won't work with `--enable-shared`.
The change to `ffi/winapi` makes it match the documentation.
original commit: cceda78374d94645f2083503371ca43b32b3b10e
This implementation runs about 10% faster than the old when searching
for "λ" in (collection-file-path "unit.rkt" "drracket" "private"). It
is copied directly from the search search algorithm from Wikipedia
called Knuth-Morris-Pratt, but with a fancier version of get-char that
cooperates with text%'s snip interface for more efficient linear
scans of characters.
It also generalizes the previous one by supporting searching into
embedded text% objects inside editor-snip% objects
related to PR 14688
related to PR 14687
original commit: 06b9b4f0a2af26fdf0cb519f225521b8ca8362c6
The `--enable-natipkg` configuration option adds "-natipkg" to the
platform library subpath. The suffix is intended to trigger the
installation of packages that supply native libraries for supported
platforms (where 64-bit Linux is the supported platform, for now, for
main-distribution packages), instead of relying on libraries installed
via the OS's package manager.
The intended client for "-natipkg" is the package-build service, where
installing packages via the OS package manager would require network
access and either trust or constrained installations. The build
machine is intentionally disconnected from the network and can only
access Racket packages, so repackaging native libraries as Racket
packages makes those libraries accessible.
A disadvantage of this approach to installing native libraries is that
it creates work for implementers of packages that access native
libraries. Those implementers will have to supply packages for 64-bit
Linux versions of native libraries to the degree needed to build and
(eventually) test the package. An advantage of the approach is that it
requires no changes to the package system; it will be cheap to replace
this approach if we find a better way to deal with native libraries
and/or OS packages in the package-build service.
original commit: 40f5ec070aa2764ea1bec1954769cdd025c443fb
The right way to render to pixmaps is to create a GLX pixmap wrapper
and render to *that*. Almost nobody does this - including libgtkgl -
and it's almost never a problem. But it causes crashes on my system
in indirect rendering mode.
This commit changes three things.
1. OpenGL on Linux no longer requires libgtkgl, only libGL, which
comes preinstalled on many (most? almost all?) systems.
2. Rendering to pixmaps is done properly, via a GLX pixmap wrapper.
3. Direct rendering is done whenever possible, even for pixmaps.
original commit: c601b82f04586b686583107b80aceef4e8606ae1
On 10.9 and later, `racket/gui` now disables App Nap. Otherwise, a
program like
#lang racket/base
(require racket/class
racket/gui/base)
(define T 0.05)
(let loop ([prev (current-inexact-milliseconds)])
(sleep T)
(define now (current-inexact-milliseconds))
(define delta (- now prev))
(when (delta . > . (* 2000 T))
(printf "long wait ~a at ~a\n" delta now))
(loop now))
will start to report a wait of more than 10 seconds, as App Nap
puts the process to sleep.
Relatedly, when `racket/gui` is started via plain `racket` (as opposed
to GRacket), then it starts in "accessory" mode instead of "regular"
mode, which means that the application does not appear in the dock
or have a menu bar. As soon as a frame is shown or a root menu bar
is created, the application is promoted to "regular" mode. This works
in 10.7 and later.
original commit: b336194cf420e8b978f0f63cffc0f69e59fcda9a
On Unix and Mac OS X, the key has long been reported as #\u3,
even though the documentation says 'numpad-enter.
A more compatible change would be to adjust the documentation and
also change DrRacket and the framework to recognize #\u3 instead
of 'numpad-enter. But there doesn't seem to be a good reason to
treat #\u3 as "numpad Enter" --- particularly as opposed to treating
it as "Ctl-C" --- other than ancient Mac history.
On Windows, numpad Enter continues to be reported as #\return,
since Windows event handling doesn't naturally or easily distinguish
the two keys.
original commit: 7d388a0795cd42e12e0ff3431d744c0bb89ac37b
Following 54e42664df, use cairo_paint() instead of cairo_fill()
to copy offscreen content onscreen, just in case it's faster.
original commit: a85a2d43923d604d9dd49de430975f62c448332d
The specialization to Win64 to work around a Cairo clipping
problem probably had more to do with the version of Cairo,
instead of the variant of Windows, since both variants need the
workarounds after a Cairo upgrade.
original commit: 641fa5f744bc61916c257ed8ca59f7480a91a75f
A pan gesture is turned into a WM_{H.V}SCROLL event in a
way that `racket/gui` did not recognize as a change to the
scrollbar. I'm not sure that this change fixes the problem,
but it seems worth a try.
original commit: 40f0682075f86149a72a87cd028bd71f8e51cbbe
For a font with 'aligned hinting, the font map caches metric
information that depends on the destination transformation,
at least on Windows. Make the font-map cache sensitive to the
destination's current transformation.
This bug was exposed by support for DPI-aware GUIs on Windows,
but the problem was more general.
original commit: 9ee2bd9b6086c696c2be8f01a07db754e4406312
Roundoff can place a child of a container so that it's position plus
width extend beyond the container's width. For some controls, that
looks especially bad. Approximate precise scaling by having those
control sizes round down, instead of up, while leaving other kinds
of controls alone.
original commit: ed92e271e848513fc0d2e9b54a89d86947fdb465
The `racket/draw` library is now independent of the screen resolution
on Windows. Font sizes in "points" are the only place where the
resolution mattered before, and now `racket/draw` assumes a
traditional 96dpi on Windows and Linux (and a traditional 72dpi
on Mac OS X).
Setting the scale for "text and other items" in Windows now adjusts
the backing scale of screen and canvas-compatible bitmaps, as well as
setting a scale on canvas drawing. Window and screen positions and
sizes are similarly scaled; for example, if the screen is 2048x1436
with text scaled by 200%, then `racket/gui` reports the display size
as 1024x768 (and the display backing scale as 2.0).
Backing scales of 1.25 and 1.5 are common for Windows. Rounding
associated with those scales could cause trouble for virtual -> actual
-> virtual conversions.
original commit: a64a1cb17722a49558ee76b5400d54aa040d1825
If a keymap has a grab, then discard key events that are modifier
changes or key releases.
Adjusts commit 8ba8d01ec0 so that Ctl-u work in DrRackt (and
other framework-based programs).
original commit: b3b9eb0eb4ea8ef4e97bde4b9799f92caf958737
Suppress WM_KEYDOWN messages to a button or checkbox, so that the
top-level window takes care of Space and Return for a button or
checkbox with the keyboard focus.
Closes PR 14710
original commit: 032397d6f9694d4c3dff24e3511d51657d19cf15