Commit Graph

5250 Commits

Author SHA1 Message Date
Matthew Flatt
f2dab2b828 in-terminal: add a close-calllback argument
original commit: 4fee662ad87a50a700cde42847e563c03024a845
2014-11-25 12:34:36 -07:00
Sam Tobin-Hochstadt
3bac3723b9 Remove stray reference to Racket in LICENSE files.
Related to PR 14842.

original commit: 3bbdd134b1754d51422eeaec1c35e9c62d45144c
2014-11-25 14:09:57 -05:00
Robby Findler
0e2a9abda1 fix bug in 8027e48
original commit: c53c29d9d8c69f9171e3685249286f3d449e66e1
2014-11-24 22:23:39 -06:00
Matthew Flatt
7a1cb5ed11 text%: avoid O(n^2) behavior on string insert
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
2014-11-24 16:27:11 -07:00
Matthew Flatt
8fc5cc6f7e racket/snip: fix bug in splitting string snips
original commit: f02bfbd11ea71b6e0afcd1424da754f2bdea764b
2014-11-24 16:27:11 -07:00
Asumu Takikawa
ba6fab5e8e Fix typo in GUI docs
original commit: 51099e660e314b974ad99a60d8cb4118488e7048
2014-11-24 15:10:30 -05:00
Robby Findler
e4cc41ab4a adjust text:ports to better deal with giant amounts of bytes
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
2014-11-23 21:10:54 -06:00
Robby Findler
58ba586834 fix control-paren-keys keybindings for altgr keys
original commit: ec6bb1b8c032dedbd65a8a82972bc4c3c0ef0bd5
2014-11-06 09:39:41 -06:00
Robby Findler
8b389cab99 fix control-[ when 'framework:automatic-parens pref is set
original commit: 4afd6c86d00380090ff2b38b80f3726ac4bed27c
2014-11-04 20:38:58 -06:00
Matthew Flatt
6669afac2d racket/gui gtk: fix event handling on choice%
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
2014-11-02 09:14:29 -07:00
Matthew Flatt
97cf41dfee restore Cygwin support
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
2014-11-01 06:50:24 -06:00
Robby Findler
0dd2719219 try to take the autowrap bitmap into account when sizing the repl input box
original commit: fa413f14a9d08442e5ca4bfb9427bd553324b89c
2014-10-28 17:09:52 -05:00
Robby Findler
7f29cd1273 adjust the wrap-bitmap-width field to always have an inexact number
original commit: 00a7eaca2c1fd527ebcf148151178bf208c37d0d
2014-10-28 17:09:52 -05:00
Robby Findler
479772fbbb add the get-autowrap-bitmap-width method to text%
original commit: 5052e8251871046767e1851d078b883b4d829693
2014-10-28 17:09:52 -05:00
Robby Findler
269e2f583c move find-string tests into the wxme test suite
original commit: 6d4b708851cd0a16d7e476746ef1c66a2665bb8b
2014-10-28 08:25:37 -05:00
Robby Findler
72ac3e8972 fix incorrect interpretation of 'eof in new find-string implementation
original commit: 13d7e264c4c78a0a029a4a1427b2130ac262d6be
2014-10-27 16:38:39 -05:00
Robby Findler
290b5c6893 simplify and extend the find-string method in text%
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
2014-10-25 21:52:18 -05:00
Martin DeMello
5066731b25 Add a disposal arg to write-animated-gif
original commit: bc5d86f494f248afe6f6aa90f4a020b270bba1fc
2014-10-21 10:14:21 -06:00
Robby Findler
d0249aec6d guard object=? test properly
original commit: 496230db12b7b6669cea08f19e5695d74b2e39d7
2014-10-18 11:12:57 -05:00
Matthew Flatt
c47de64349 configure: add --enable-natipkg and 64-bit Linux native libraries
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
2014-10-08 05:19:33 -06:00
Neil Toronto
094aedd8ce Added get-current-gl-context, tests (also for make-gl-bitmap), and docs
original commit: 1e99637bf887beab5bfd64be2a7bf0c918a38114
2014-10-06 16:37:06 -04:00
Robby Findler
8049145f64 make 2htdp/image's equality function ignore baselines
also some Rackety and spelling

related to PR 14760

original commit: 0c8834d5672d5d196f537002313be38750b8ba3f
2014-10-05 07:17:44 -05:00
Neil Toronto
4c589fdacc Add more XSync to clear the queue to avoid crashes with repeated use
original commit: c89434d56b7df9cc411aeb24c885ae0dc2b20cbb
2014-10-04 06:22:41 -04:00
Robby Findler
f8b4aed399 fix bug in 144fdb2a
original commit: f68f3295645695baa2153b3ffe90c35307882012
2014-10-03 21:55:21 -05:00
Neil Toronto
ba3406cdac Added support for core OpenGL profiles in Linux (see set-legacy?)
original commit: 36ff6d5dbb535fae3e67b47959c10af9ed219092
2014-10-03 16:15:41 -04:00
Neil Toronto
a83e326ebe Use gl-config% multisample size as an upper bound instead of a lower bound
original commit: c50969d60e6b1d3f7de05b4d74826ee0236d7967
2014-10-03 13:01:57 -04:00
Neil Toronto
1a49366031 Only ask for multisampling of GLX 1.4 or higher; make getting context atomic
original commit: 6d7006e7bc8e499405518f10c3c797f1ac60d8de
2014-10-02 17:58:50 -04:00
Matthew Flatt
6c3db93ec4 racket/gui Cocoa: fix test for 10.9
original commit: 341a218ea51a141d3a3c0bbce1a578d7886f0078
2014-10-02 11:33:38 -06:00
Neil Toronto
4f9ce70cef Added warning about GLX choosing indirect rendering
original commit: 4c95f3da0d2a8885cd9fa6d9c12aa9ac07dce5f3
2014-10-01 22:51:03 -04:00
Neil Toronto
faa9ae72fd Remove dependence on libgtkgl; fix indirect rendering problem
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
2014-10-01 22:51:03 -04:00
Matthew Flatt
8b183a4442 racket/gui Cocoa: disable App Nap; switch to GUI mode more lazily
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
2014-10-01 13:13:37 -06:00
Robby Findler
c2661d6b48 improve magic opening square bracket for for/fold
original commit: 144fdb2a18297e9b16441f814a6a73e87bf18fcb
2014-09-29 09:02:44 -05:00
Robby Findler
c2e44082c8 added for/fold back into the pref defaults for the magic opening
square bracket

(this was a bug in c03c02bc)

original commit: c5220e3030703d986cd0e9ec8a11245475072dcf
2014-09-28 17:14:05 -05:00
Robby Findler
f4551118a8 fix for/fold indentation
inspired by Greg's RacketCon talk

also, Rackety

original commit: c03c02bccbe0590ebe14ecf2f0cf0426ee5cb7e4
2014-09-28 15:16:59 -05:00
Matthew Flatt
ab2729be09 racket/gui: fix reporting of numpad Enter as 'numpad-enter
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
2014-09-28 08:39:42 -06:00
Matthew Flatt
84fb22abaf racket/gui Windows: rely on patched Cairo instead of workaround
original commit: 3ad2cb83bba522fb91f33bc1a3d061ed3a6bfac3
2014-09-25 16:17:29 -06:00
Matthew Flatt
5956a30e42 racket/gui: use cairo_paint() to copy buffer to screen
Following 54e42664df, use cairo_paint() instead of cairo_fill()
to copy offscreen content onscreen, just in case it's faster.

original commit: a85a2d43923d604d9dd49de430975f62c448332d
2014-09-25 14:00:00 -06:00
Matthew Flatt
fa43134aa8 racket/gui win32: enable clipping-problem workaround for 32-bit mode
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
2014-09-25 14:00:00 -06:00
Matthew Flatt
3404c0084b racket/gui Unix: avoid startup output
original commit: 8ea68c743f338ec15eeb31710f9c4053436f01ac
2014-09-24 08:40:53 -06:00
Matthew Flatt
1167e184b8 racket/gui win32: try to make pan gestures work
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
2014-09-24 08:40:52 -06:00
Matthew Flatt
dd3dfc6617 racket/draw: fix font metrics versus transformations
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
2014-09-24 08:40:52 -06:00
Matthew Flatt
e9b6c166a9 racket/draw: compensate for roundoff in Windows GUI scaling
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
2014-09-24 08:40:52 -06:00
Matthew Flatt
22ac1a94f2 racket/gui win32: fix measurement of message% content
Strip away "&" before measuring.

original commit: 58e24e18a27fee2b6b487f5163c2eda48e347546
2014-09-24 08:40:52 -06:00
Matthew Flatt
20bc95fb98 racket/gui: DPI-aware on Windows
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
2014-09-24 08:40:52 -06:00
Robby Findler
382b050c4e fix parsing for when dot produces numbers in scientific notation
closes PR 14748
also, Rackety

original commit: e946fed565348ddb65fb7fb8e4d9fe604c5208c8
2014-09-23 16:58:48 -05:00
Robby Findler
25851cb537 fix magic-open-paren bug
also, replace some eq?s with equal?s.

original commit: f4d66ad4d172a597a82fe66c4f5018805e66b299
2014-09-07 15:34:48 -05:00
Robby Findler
d470a1b912 add the capability to dynamically adjust the edge label font
original commit: b212f21977f55c3ad56881c9d4c452aa241cc3cf
2014-09-01 10:47:29 -05:00
Robby Findler
463dcc2fec fix dot layout when children are deleted
closes PR 14718

original commit: 854e9a997ab127db791547efdbc3d51ca2a63d0e
2014-09-01 04:11:42 -05:00
Matthew Flatt
44a704d123 racket/gui keymap: adjust handling of 'control, etc., events
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
2014-08-31 15:26:59 +02:00
Matthew Flatt
3dcb02a3fc racket/gui win32: fix Space handling of buttons and checkboxes
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
2014-08-31 11:59:44 +02:00