Commit Graph

232 Commits

Author SHA1 Message Date
Matthew Flatt
c4ef1829fc Gtk: adjust handling of composed input
Intended to fix #29
2016-03-10 13:10:37 -07:00
Robby Findler
cf2859049a add a preference to control the maximum reflow width 2016-03-08 09:29:48 -06:00
Robby Findler
28406b9a76 remove the restriction that new preferences can be registered only before a snapshot is grabbed
also improve the docs a little bit and some Rackety
2016-03-08 09:29:03 -06:00
Robby Findler
da7a258da8 bring down below 102 columns and fix a set! expression
to actually have an effect
2016-03-07 08:30:32 -06:00
Matthew Flatt
2ab1fb319a rearrange dc fields to avoid undefined-checking chaperone 2016-03-02 08:42:55 -07:00
Robby Findler
ab063326fe change indentation strategy for sequences whose head is a keyword
assume that these are part of some internal structure of something
that, in general looks like

  (#:x 1 #:y 2 #:z 3)

and so prefer to indent like this:

  (#:x 1
   #:y 2
   #:z 3)

instead of like this:

  (#:x 1
       #:y 2
       #:z 3)
2016-02-25 10:37:44 -06:00
Matthew Flatt
be30bf721d Cocoa: avoid backing-dc failure on zero-sized canvas
Closes https://github.com/racket/racket#1255
2016-02-22 05:05:35 -07:00
Robby Findler
c8c8ce64eb use the right font for sizing the line numbers invalidate region
closes #41
2016-02-19 09:03:39 -06:00
Robby Findler
d88ba8d2cd fix on-scroll-to callback method when an editor has multiple canvases
closes PR 15252
2016-02-17 08:58:09 -06:00
Robby Findler
8e81b5346a don't color parens when the colorer is stopped 2016-02-10 09:19:33 -06:00
Robby Findler
7d5144acba adjust switchable-button so that it can change its label 2016-02-09 18:16:36 -06:00
Robby Findler
e9e2940138 adjust indentation so that it treats only symbols as things with
special indentation

(this could only come about if the regexp specification in the prefernces
matched (the printed out) version of strings, so it wouldn't happen with
the default preferences)
2016-02-09 13:44:30 -06:00
Leif Andersen
9411eb44c4 Add with-* to the set of lambda like expressions. 2016-02-06 19:45:57 -05:00
Matthew Flatt
5736535b8a avoid spurious screen refresh on text-measure operations
The drawing layer now indicates whether drawing content was
changed as it releases a drawing handle.
2016-02-05 16:51:39 -07:00
Leif Andersen
f02fd8f338 Add link to weak reference. 2016-02-05 18:36:02 -05:00
Matthew Flatt
d28ab71058 fix -singleInstance for GTK+3
Closes PR 15240
2016-02-05 10:40:04 -07:00
Robby Findler
021f9a6a0a delay the creation of the information in the info text
this has the advantage of that the information is inserted when the
state of the text is set up so that font sizing works

it also means that if there is a syntax object with a syntax
object on its properties with another one like that etc etc etc
they will only be rendered when they are made visible which
theoretically could be a performance improvement for some people
2016-02-02 09:36:15 -06:00
Robby Findler
55e34bd6d4 make syntax snips inherit the style-list of the editors that contain them 2016-02-01 18:02:00 -06:00
Matthew Flatt
345a20c5e8 use NSOpenGLPFAAllowOfflineRenderers for GC bitmap
Try to tell Macs with two graphics cards that it's ok to
use the low-performance one for the GC bitmap (when
GL is used for that, which is OS X 10.11 and later).
2016-01-16 08:50:06 -07:00
Matthew Flatt
55d0d96dbe Gtk: fix handling of widget to extract text colors
With GTK+ 3 on Raspbian, at least, the old management of the
widget causes a crash.
2016-01-12 10:05:09 -07:00
Matthew Flatt
e206dab087 use #:runtime?-id for improved cross-build support 2016-01-09 09:47:28 -07:00
Matthew Flatt
4d5d08f07f fix back-end reference for cross-build 2016-01-08 16:45:16 -07:00
Matthew Flatt
6e7964b0b7 include icons needed by "gui-lib" in the package
The "plt-logo-48x48.png" file is a copy of "plt-48x48.png" from
"icons", but renamed to avoid conflicts.
2016-01-08 16:31:52 -07:00
Matthew Flatt
dbce2e2878 avoid an NSTableColumn warning 2016-01-08 07:58:53 -07:00
Matthew Flatt
0e344def40 Windows play-sound: remove extra delay after async 2016-01-05 07:31:01 -07:00
Matthew Flatt
8ae077c22a Windows play-sound: use the right custodian registration
Otherwise, a GC tends to terminate the sound.
2016-01-04 19:19:51 -07:00
Matthew Flatt
76c305852b Windows play-sound: avoid leaks and shutdown on custodian
Also, stop a synchronous sound on a break exception.
2016-01-04 18:10:23 -07:00
Matthew Flatt
edc56ee8de Windows: change play-sound to use MCI
Provided by Eli Barzilay.

This approach is better than a separate process, because creating
too many processes can overwhelm the OS. Also, MCI supports more
sound formats.
2016-01-04 17:41:53 -07:00
Matthew Flatt
41d4e9dd2d Cocoa: fix refresh and fullscreen problems
Add more agressive re-enabling of screen updates and explicit `update`
calls to avoid partially refreshed frames and never-updated titlebars
on El Capitan.

Also, use `close` instead of `orderOut` to hide a frame. That fixes
problems with closing windows that are in fullscreen mode.

Closes racket/drracket#33
2015-12-31 15:50:41 -07:00
Robby Findler
aeb2577715 make error message a little more informative 2015-12-29 21:25:28 -06:00
Matthew Flatt
196797b529 Windows: fix play-sound to return a boolean 2015-12-28 10:09:10 -06:00
Matthew Flatt
ca24d94cdc Cocoa: avoid screen sync for GC-blit GL context
Affects 10.11 and up
2015-12-28 09:42:23 -06:00
Matthew Flatt
87c2317cbc Windows: change play-sound to run an external program
Running a sound through a separate process allows multiple
sounds to be played at once.
2015-12-28 08:24:34 -07:00
Matthew Flatt
87e17a89da Windows: fix get-current-mouse-state for HiDPI 2015-12-23 08:31:38 -07:00
Matthew Flatt
d170a8ff31 editor<%>: request incremental GC on key & mouse events 2015-12-19 12:45:25 -07:00
Matthew Flatt
446df9e047 put on-to-scroll callbacks in a refresh sequence
Avoid flickering for the "#lang" line and documentation
wedge in DrRacket, for example.
2015-12-19 07:54:30 -07:00
Matthew Flatt
1944cd8dbd regsiter-collecting-blit: support background bitmap in El Capitan
The GC blit implementation used on Mc OS X 10.11 assumed that
the no-GC bitmap is blank. Make it use the given no-GC bitmap.

Also, repair the left-to-right flipping(!) of the GC bitmap,
and repair a backing-scale mismatch that could leave a thin
border around a GC blit.
2015-12-18 16:05:48 -07:00
Robby Findler
7c43e6d876 fix contract-related errors in framework/splash 2015-12-18 11:21:04 -06:00
Robby Findler
3af5db35be fix bugs in support and docs for the snip flag HANDLES-BETWEEN-EVENTS
(the previous commit was pushed too soon; it is completely broken. Apologies)
2015-12-17 22:24:59 -06:00
Robby Findler
759d89443f add support and docs for the snip flag HANDLES-BETWEEN-EVENTS 2015-12-17 16:18:46 -06:00
Robby Findler
6fd5459211 fix add-splash-icon contract 2015-12-15 17:41:09 -06:00
Robby Findler
debd229668 guard call 2015-12-15 14:20:12 -06:00
Robby Findler
46eb5ae3aa add contracts and fix some (theoretical) threading bugs 2015-12-15 14:20:12 -06:00
Jay McCarthy
c1cddc538c Casting flag-x-error-handler in this case too. Necessary for getting GL working on my Linux/Nvidia box to test pict3d 2015-12-14 08:55:36 -05:00
Matthew Flatt
c4793a218f Windows: avoid refresh on no-op canvas show-scrollbars 2015-12-03 05:36:42 -07:00
Matthew Flatt
d3f212b98c fix copy-on-scroll for non-integer scroll offset 2015-12-02 20:50:21 -07:00
Robby Findler
be9cd36922 added editor:font-size-message% 2015-11-27 10:41:57 -06:00
Robby Findler
fe77bb34d4 more on scroll-by-copy
make it per-editor customizable, add callbacks, and use
them to make the special first line mixin work properly
when it is enabled
2015-11-26 13:11:47 -06:00
Matthew Flatt
79128627d2 avoid scrolling too far for scroll-via-copy
But scroll-via-copy is still not enabled.
2015-11-25 16:14:54 -07:00
Matthew Flatt
4358d22a0a disable scroll via copy
Sometimes doesn't work right, as illustrated by PR 15186
2015-11-25 08:46:37 -07:00
Matthew Flatt
bdac2da540 enable scoll via copy 2015-11-25 05:07:44 -07:00
Matthew Flatt
33395ae1cf Cocoa: canvas DC copy improvement 2015-11-24 15:01:25 -07:00
Matthew Flatt
3873064c80 Cocoa: avoid over-eager refresh on OS X 10.11
A relatively late correction to refresh handling for El Capitan
(commit 9bf18505d5) causes a canvas to be refreshed too often
in some cases. Delay the refresh to restore the old timing
without the old bug.
2015-11-23 20:45:25 -07:00
Matthew Flatt
facc07e123 Cocoa: make copy method work for canvas DC
Also correct problems with disabled scrolling via `copy`.
2015-11-23 12:13:48 -07:00
Matthew Flatt
b29a7ae399 Gtk+ 3: open library in "global" mode to support the printer dialog
Opening a shared object in global mode risks conflicts with
other shared objects, but opening only one library that way
will hopefully not create conflicts.
2015-11-19 12:03:18 -07:00
Robby Findler
c0bbc70194 fix newline insertion position calculation
closes #21
2015-11-14 09:53:26 -06:00
Thomas Hilliker
acab3f14e1 added length parameter to call of snip insert 2015-11-11 16:54:05 -06:00
Matthew Flatt
9bf18505d5 fix refresh on El Capitan
When restoring autodisplay, need to check whether a display was
lost since display was suspended.
2015-11-07 06:45:34 -07:00
Matthew Flatt
746956a6ae skip clean-up of bitmap that isn't there
Backing-bitmap allocation might fail for a too-large window?
2015-10-29 07:43:45 -04:00
Robby Findler
35a288da6a allow meta-q for re-indent under unix 2015-10-25 21:14:26 -05:00
Matthew Flatt
172b7d5a56 implement GL screen sync for Windows canvases 2015-10-18 18:15:03 -06:00
Matthew Flatt
5a1d5557c4 implement GL screen sync for X11 canvases 2015-10-18 18:08:05 -06:00
Matthew Flatt
4daafb2357 implement GL screen sync for Cocoa canvases 2015-10-18 17:49:32 -06:00
Vincent St-Amour
8bfd1bb25e Add missing history annotations.
Please merge to 6.3.
2015-10-12 14:16:16 -05:00
Matthew Flatt
1d3a308532 Windows: fix WM_GESTURE handling
Broken boolean expression treated `next-scroll-is-change?` backward.
2015-10-06 21:31:34 -06:00
Matthew Flatt
a35b0e4831 another Mac OS X 10.11 refresh repair
Avoid frames that start out unpainted and end up with a too-dark
titlebar.
2015-10-06 21:24:10 -06:00
Matthew Flatt
216798a08c don't overpaint for clearing a canvas
Just in case clipping is not in place, since we have the right
rectangle handy anyway.
2015-10-06 09:42:28 -06:00
Brian Mastenbrook
d393e1a5bf Per http://msdn.microsoft.com/en-us/library/windows/desktop/dd562171(v=vs.85).aspx - adds support for SB_THUMBPOSITION events. Improves touchpad scrolling on Surface Pro 3, but not touch scrolling. 2015-10-05 06:35:20 -06:00
Matthew Flatt
b842b1feec Mac OS X 10.11: register control font to make it Pango-accessible
The new system control font is (intentially) not associated with a
font family, so it's inaccessible via Pango. A patch to Pango lets
us synthesize and register new families, so the control font can
be made accessible.
2015-10-04 20:36:17 -06:00
Matthew Flatt
cdc992ccb9 fix problems and consistency with fullscreen in frame%
The `fullscreen` method implied `show` on Mac OS X and Windows, but
not on Gtk, and a frae shown that was was not properly registered
as shown (e.g., the application could exit). For consistency, adjust
`fullscreen` to not imply `show`. Also, shift to a remaining frame
on Mac OS X when a fullscreen frame is closed.
2015-10-04 14:19:00 -06:00
Matthew Flatt
ea576d3177 Mac OS X 10.11: disable auto-update for suspended-flush windows
Previous versions of OS X seem to have automatically disabled
update for a window when flushing is disabled, but now we have to
do it ourselves, otherwise text editors can flicker a lot. (The
system change is probably related to the removal of the
`isFlushWindowDisabled` method of `NSWindow` (which was
deprecated in 10.10).
2015-10-04 12:11:21 -06:00
Matthew Flatt
52ac3da7bd allow 0 as initial value for manual scrollbars
Broken by 4ad47927.
2015-10-04 10:36:27 -06:00
Matthew Flatt
a948c8a2f0 avoid showing GC icon for a frame that is not shown
Commit ac2d39e0e1 has the side effect of showing the window when its
parent is still hidden.
2015-10-03 13:20:59 -06:00
Matthew Flatt
5f63b8c95b fix get-color-from-user on Mac OS X
Closes PR 15121

A better solution would be to implement the dialog, but given
how long it's been broken, maybe no one cares enough for that
to be worthwhile.
2015-10-02 15:56:42 -06:00
Matthew Flatt
ac2d39e0e1 fix GC blit for Mac OS X 10.11
The old strategy of switching a transparent window to solid and back
doesn't work on 10.11; it appears that queued messages must be handled
for the window to become visible, but that's not allowed during a GC.
The strategy for 10.11 and up create an OpenGL canvas, which acts as a
direct-to-screen drawing area that a GC callback can affect without
Racket-level allocation.
2015-10-01 22:02:37 -06:00
Robby Findler
1dca74da1d add earlier check to help suss out bad mixin compositions 2015-09-16 10:44:56 -05:00
Vincent St-Amour
1b8b9b94fe Use option contracts from racket/contract/option. 2015-09-14 14:33:32 -05:00
Robby Findler
e5cb582ed5 change the preferences defaults so that the default for bold in the color
schemes isn't "turn it off" but instead "defer to the default"
2015-09-14 09:43:19 -05:00
Vincent St-Amour
2423c91319 Add snip canvases to mrlib, from unstable/gui/snip. 2015-09-11 17:19:40 -05:00
Vincent St-Amour
231f8ad6a9 Use 2d instead of unstable/2d. 2015-09-07 18:40:58 -05:00
Robby Findler
5d815a0345 add the framework:standard-style-list:weight preference 2015-09-05 17:35:15 -05:00
Matthew Flatt
580e49f520 cocoa: fix placement of the file dialog as a sheet 2015-09-04 07:54:34 -06:00
Matthew Flatt
79a3a9ebf8 use cross-system-type for the mred installer 2015-08-27 20:59:33 -06:00
Matthew Flatt
73065a3ba6 fix propagation of 'deleted flag for low-level editor-canvas% 2015-08-27 20:52:34 -06:00
Matthew Flatt
cb8f2ef3fd GTK+ 3: fix auto-resize of message% 2015-08-27 15:28:09 -06:00
Matthew Flatt
b06ee46854 GTK+ 3: fix client->global in a frame with a menu bar
It seems that the right answer was produced in GTK+ 2 due to a
client-location callback, but change the code to use the intended
approach of tracking the menu height.
2015-08-21 16:19:47 -06:00
Matthew Flatt
3be6a90ec7 GTK+3: fix scrolling panels
Use a GtkLayout instead of GtkFixed for the outer widget,
so that it isn't forced to a large allocation by its
children.
2015-08-21 11:50:46 -06:00
Matthew Flatt
91a1ab52c3 GTK 3: try yet again to make panels work right
To enable mouse events to a panel, go back to using a
GtkEventBox for a panel, but make it non-visible so that
it doesn't interfere with the parent's background color.
The extra layers added in the previous commit are still
important to avoid turning that into a native window
(which can completely breaks background drawing). Finally,
add an extra layer just around tab panels so that events
get delivered to the tabs. (It's possible that the extra
layer will make the background wrong just around the tabs,
if the tabs don't fill the area above the panel; too bad.)
2015-08-21 08:31:48 -06:00
Matthew Flatt
2c6848f3c9 GTK 3: try to make panels work right 2015-08-19 15:59:11 -06:00
Matthew Flatt
f91e549e59 Cocoa: no child-window workaround in 10.10 (to avoid different bug)
A GC-icon display is implemented with a child window on OS X. In some
OS X version prior to 10.10 (not sure which ones), screen
reconfigurations did not move child windows properly relative to
parent windows, so all child windows were reset after a screen change.
In 10.10, meanwhile, Mission Control can cause screen-change
notifications, and adding a child window to a Mission
Control-minimized fullscreened window will goes terribly wrong.
Fortunately, 10.10 seems to update child-window locations correctly on
screen reconfigurations, in which case the old workaround that hits
the new bug can be skipped.
2015-08-19 12:05:47 -06:00
Matthew Flatt
999c603ba0 Cocoa: avoid showing GC blits when canvas is hidden 2015-08-19 12:05:24 -06:00
Matthew Flatt
4f3216f55a fix GC blit resizing
Conversion of a bitmap to the specified size was broken and made more
broken by recent changes.
2015-08-19 11:59:29 -06:00
Matthew Flatt
4453642e52 GTK+ 3: make panel's event box invisible
Making the event box invisible prevents painting a gray
background when placed over a different background (such
as a table panel that is given a different background by
its theme).
2015-08-19 10:35:14 -06:00
Matthew Flatt
312456d1bb GTK+ 3: treat combo-field% canvas like transparent canvases
The canvas part of a `combo-field%` needs to be non-native
(in the GdkWindow sense), so treat it like a transparent
canvas.
2015-08-19 08:18:20 -06:00
Matthew Flatt
0fc8ef6492 GTK+ 3: fix flicker with transparent canvases
Restore the use of freeze & thaw on transparent canvases, but
ensure that the implementation underlying the GDK window won't
change while a freeze is in effect.
2015-08-18 17:34:24 -06:00
Vincent St-Amour
8d8eaf0a41 Move prefs:get/set from unstable/gui/prefs to framework/preferences. 2015-08-18 16:41:25 -05:00
Vincent St-Amour
75aed14d55 Move framework/notify docs from unstable docs. 2015-08-18 16:41:25 -05:00
Vincent St-Amour
c83a1cbd4d Export using framework naming conventions. 2015-08-18 16:41:25 -05:00
Vincent St-Amour
52e94b1c9e Fix pointers. 2015-08-18 16:41:25 -05:00
Vincent St-Amour
77f58c1e3a Move unstable/gui/notify to framework/notify. 2015-08-18 16:41:25 -05:00