Commit Graph

5229 Commits

Author SHA1 Message Date
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
Matthew Flatt
4a497f5be3 racket/gui cocoa: adjust control font for 10.10
original commit: 321a3be29f121f4acc11bfff58cbce22ecdb383a
2014-08-29 14:56:27 -06:00
Neil Toronto
02d85d78ab Altered keymap% to not claim to handle key events that it doesn't
Previously, `keymap%` would return #t for all shift, ctrl, and key release
events. DrRacket's editors would then not handle those events (correctly,
as they shouldn't handle already-handled events), meaning that the events
weren't sent to any snips.

original commit: 8ba8d01ec07d45ec67bd06df0670c7498fa20bb9
2014-08-29 16:44:02 -04:00
Matthew Flatt
d1eb9f9843 racket/gui gtk: workaround problem with async IBus input method
Affects Ubuntu 13.10 and 14.04, especially with multiple processors.

original commit: 3a716b98c0c932465a0e9bd75e9086afd75b32d0
2014-08-29 10:12:27 -06:00
Matthew Flatt
17c089c814 racket/gui: change placement of children in panel% and pane%
The `panel%` and `pane%` classes were not originally intended for
direct instantiation; instead, `horizontal-pane[l]%` and
`vertical-pane[l]%` provide basic placements that make sense for
multiple children. Adjusting `pane[l]%` to just overlay all children
seems both sensible and useful (if only one child is shown at a time,
for example).

As suggested by David Nelson.

original commit: 32ae3f83080ab625f0bcfdf907e3682a2da9f36b
2014-08-24 07:29:55 -06:00
Spencer Florence
43d84704c6 Slight change to how drracket handles lexer/colorers, and doc changes to color:text<%>
original commit: dc4398235a4cdef97a14dce9f2342721486e3bbc
2014-08-20 22:25:50 -05:00
Phil Nguyen
d2ff4f11c4 fix tiny typo in documentation for framework/test
original commit: 77ae11e2483366d46f5261957bdef8e80d985756
2014-08-15 11:19:48 -04:00
Matthew Flatt
7b93d2c8e3 add update-implies to package "info.rkt"s
original commit: eb9cbe20bf7b4ebc1eee63e2ca079ae566ff8c05
2014-08-14 16:49:53 +01:00
Matthew Flatt
3f05abfcd0 racket/gui: fix problems with canvas autoscroll
original commit: 39eae2e647dd7351e79db9a5152dcf1dfdb35847
2014-08-14 15:58:54 +01:00
Matthew Flatt
0d66aeb218 racket/gui: minor test clean-up
original commit: ad870a1d0f4c50306297183daa91e94320a9accb
2014-08-13 09:17:16 +01:00
Matthew Flatt
fe9f9afffd racket/draw and racket/snip: avoid some undefined-checking wrappers
The changes to `pen%` and `brush%` are related to the
`racket/class` repair of the previous commit, while the
`style%` change is because I didn't look at it before.

original commit: fd67feddab577f8e756c78a9c2b89a9b4a66dbb5
2014-08-06 08:48:19 +01:00
Matthew Flatt
3de4b74d6b racket/gui: report AltGr combination for left Control plus right Alt
Use the new AltGr report to enable Control-Alt- combinations in
DrRacket (and other framework programs) when they do not intefere
with plain AltGr combinations.

original commit: 513ff778110b0a4f4ed725a9d4d79bacb275f97f
2014-08-05 16:23:09 +01:00
Matthew Flatt
984c5ca1a1 racket/gui cocoa: revive make-gl-bitmap for Mac OS X 10.7 and up
Port from AppleGL to CoreGL, and implement offscreen drawing through
a framebuffer instead of CGLSetOffScreen() for 10.7 and later.

original commit: a57734d7ae8606b01d9d054bfc761f0c74db2368
2014-07-31 14:47:30 +01:00
Robby Findler
b8f71d1d6b fix some bugs found by the contract library's random testing
the procedure common-get-file-list was apparently never implemented,
so just remove it

original commit: a3c7c557eaf432451294e2fadab26c6635de60f0
2014-07-29 09:38:09 -05:00
Robby Findler
be3e5f35f4 fix contracts for racket:get-color-prefs-table and
racket:get-white-on-black-color-prefs-table

Apparently these contracts have always been wrong;
5.2.1 had these exports with the wrong contracts and
5.2 didn't have them

closes PR 14664

original commit: 10ae6fbb90dc0dde015e6c8e5263ebe12433b19e
2014-07-29 09:38:09 -05:00
Jay McCarthy
a74928552b Adding legacy/core decision in gl-config/canvas
original commit: 31001f3484c3d379a2c85b5c5974283d3f909d61
2014-07-23 08:56:32 -04:00
Matthew Flatt
4c71b5d039 racket/draw: fix problems with set-argb-pixels on scaled, no-alpha bitmaps
Also, fix the docs to clarify that `just-alpha?` as #t means a no-op for
a target bitmap that has an alpha channel.

original commit: a1147335597ef2879ad19678e067a62a6b930973
2014-07-23 09:19:34 +01:00
Matthew Flatt
1deb80b255 racket/draw: fix get-argb-pixels for unscaled and just-alpha
Closes PR 14653

Merge to v6.1

original commit: 295cb46c48bd70c1158bdc5e2b1f285b4ac2d086
2014-07-23 08:44:17 +01:00
Robby Findler
1740b64498 remove call to 'time'
Please add to 6.1 release branch

original commit: cdd06f108ca7ecb2ce4a1a471566b0863a2a4fad
2014-07-22 18:18:28 -05:00
Robby Findler
d734fe9449 I'm also responsible for the gui pkgs
original commit: 07dde04ef2f289eb744c737c17fbff32b15c65c7
2014-07-16 09:52:16 -05:00
Robby Findler
86b2e602a8 added insert/io
original commit: fc492049564ce0b7d2a3b6f889f4e9b86aef6ed4
2014-07-16 09:52:16 -05:00
Robby Findler
5672033374 add on-goodbye-event
This change requires a coordinated change to the snip-lib pkg and to
the gui-lib package. The docs are in the gui-doc pkg and yet point to
the snip-pkg as the containing pkg, so I updated the version number
for snip-lib and left the version number for gui-lib alone

original commit: 4b92117a9fd6fb638240bc6e57e25bc9de138c53
2014-07-16 09:52:16 -05:00