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
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
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
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
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
Port from AppleGL to CoreGL, and implement offscreen drawing through
a framebuffer instead of CGLSetOffScreen() for 10.7 and later.
original commit: a57734d7ae8606b01d9d054bfc761f0c74db2368
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
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
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