Commit Graph

670 Commits

Author SHA1 Message Date
Carlos Garnacho
8d56346f9b textview: set text direction information on text handles
This makes them point to the correct place, given the theme supports
this.
2015-06-11 17:14:23 +02:00
Matthias Clasen
ac5fcc6b72 text view: Select word on double tap
This is an initial attempt at implementing double-tap selection.
2015-06-09 23:31:00 -04:00
Matthias Clasen
8ad0ef27a1 text view: Make touch selection work with mouse
The buttons on the popover where stealing the focus from the text
view on click, causing the popover to be dismissed before the action
was taken. Fix this by making the buttons not take focus on click.
2015-06-09 15:49:10 -04:00
Matthias Clasen
0a2b1b68fa text view: Always clear handles for mouse interaction
There were some cases where we left a handle visible
during mouse interaction, which is a little weird.
2015-06-08 06:56:12 -04:00
Matthias Clasen
76836dcd81 text view: Move touch selection a little further away
Otherwise, it looks cramped, and we end up under the finger.
2015-06-08 06:55:21 -04:00
Matthias Clasen
4511ff76fa text view: Use the drag-started signal
Use the drag-started signal to differentiate between drags that
move a handle and taps on a handle. Show the touch selection popup
for the latter, but not the former.
2015-06-08 06:55:21 -04:00
Matthias Clasen
32be35010f text view: Don't popup after drag selection
Don't show the touch selection popover after a selection drag
ends. Instead, the popover will be triggered by an explicit
touch on the selection.
2015-06-08 06:55:21 -04:00
Matthias Clasen
aff47da950 text view: Never show handles and popover at the same time
Hide the handles when the popover appears, and brind them back
when it disappears. This will need revisiting if we start using
the popover for mouse interaction as well, where we may not
want handles to show up.
2015-06-08 06:55:21 -04:00
Matthias Clasen
0c6205d538 text view: Shorten touch selection timeout
We don't want the popover to appear spontaneously, so eventually
the timeout may go away altogether. For now, shorten it to 50ms,
to avoid rewriting all the places where the timeout is set or
unset.
2015-06-08 06:51:08 -04:00
Matthias Clasen
6bbaa70c4c Update touch selection style
Update style for touch selection in GtkEntry and GtkTextView
according to https://wiki.gnome.org/Design/OS/Selections

Add 'Select All' to the default actions, change actions
to use icons and move the popover to the bottom. If there is
no selection, just offer to paste.
2015-06-07 01:08:33 -04:00
Carlos Garnacho
243cfd21a2 textview: Update handles after flushing scroll changes
Text insertion/pasting might trigger scroll, so we'd have to wait
until the text was revalidated and the scrolling truly happened
before we can check the new handle(s) position.
2015-06-02 17:30:09 +02:00
Carlos Garnacho
b54031d505 textview: Avoid usage of gdk_window_get_device_position() during DnD
Just use the last coordinates given on XdndPosition/drag_motion() in
order to trigger scrolling.

When running on Xwayland, the pointer position is unknown at this
stage on the X11 side, so the coordinates given here are bogus.
This change avoids both roundtrips and this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=749679
2015-05-21 18:11:21 +02:00
Matthias Clasen
eea16f03f5 Stop using GDK_POINTER_MOTION_HINT_MASK in widgets
It is deprecated and no longer needed, and,as observed in
https://bugzilla.gnome.org/show_bug.cgi?id=746253 it
interferes with turning off event compression.
2015-03-22 17:33:38 -04:00
Matthias Clasen
c723eba135 text view: Avoid clang compiler warnings
Again, our habit to use -1 as an unset value for enum types.
2015-03-22 15:19:17 -04:00
Philip Withnall
4fc6880d83 gtktextview: Fix a definite use of an uninitialised variable
This seems to have been a typo in the original code, and allowed access
to virtual_cursor_y when it was uninitialised.

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2015-03-09 13:41:37 +00:00
Matthias Clasen
1aee4f0384 Fix a typo
commit aa1b7fab9c introduced a misuse of G_UNLIKELY in
several places. Fix all those.
2015-01-28 10:08:13 -05:00
Benjamin Otte
aa1b7fab9c css: Remove _gtk_css_style_property_changes_affect_size()
... and _gtk_css_style_property_changes_affect_font().

Replace it with _gtk_css_style_property_get_mask_affecting().
2015-01-27 05:04:34 +01:00
Nelson Benitez Leon
885b36a6d5 GtkTextView: allow to extend text selection with mouse scrollwheel
Fixes bug 710612
2015-01-10 14:36:17 -05:00
Christian Hergert
21360a453c textview: fix duplicated binding entries. use kp variants instead.
This appears to have accidentally used the normal keypresses twice instead
of the KP variants. This resulted in shift+insert pasting twice.

https://bugzilla.gnome.org/show_bug.cgi?id=742170
2014-12-31 23:27:55 -08:00
Matthias Clasen
52b3b4207f GtkTextView: disconnect the magifier on destroy
This prevents warnings that would otherwise happen when
the magifier is finalized.
2014-12-20 19:19:24 -05:00
Carlos Garnacho
51e1e3b416 textview: make magnifier size dependent on text size
The magnifier is now set enough height to show the line being currently
manipulated, which makes it just big enough to show the layout height at
that size and magnification.
2014-12-18 21:21:33 +01:00
Carlos Garnacho
025340bfc4 textview: Implement friendlier touch selection
- It is not possible anymore to trigger text DnD through touch, pressing
  and dragging from within the selection will instead extend it. Text
  shrinking is still available through the handles
- The selection mode for touch is per-word, char-level manipulation is
  still available through the handles.
- Tapping within the selection will bring in text handles, and toggle
  text selection popover.
2014-12-18 21:20:18 +01:00
Carlos Garnacho
8c091d1484 textview: Make "extend selection" only extend
This mode could also shrink the selection, plus the starting point would
seem somewhat arbitrary (actually dependent on the dragging direction of
the last selection).

Made this mode more consistent by only allowing it to extend the selection,
only in one direction for each operation, and so it keeps the current
selection as a minimum.
2014-12-18 21:20:18 +01:00
Carlos Garnacho
a2e71203c2 textview: Pass a boolean telling whether a selection drag should extend
Instead of passing a GdkEvent and let the function figure out whether the
selection should be extended, let that to the caller and just pass a
boolean here.
2014-12-18 21:20:17 +01:00
Carlos Garnacho
ccdebb6aa0 textview: Show magnifier on top of current line
The X coordinate is dependent on touch position, but Y is stepped.
2014-12-18 21:20:17 +01:00
Sébastien Wilmet
020258f85a textview: add extend-selection signal
To be able to customize the double-click and triple-click behaviors, to
provide custom selection boundaries.

https://bugzilla.gnome.org/show_bug.cgi?id=111503
2014-12-17 12:20:02 +01:00
Matthias Clasen
f74a75ae7e Handle KP keys in copy/paste keybindings
We currently handle KP variants of some keys, but not consistenly.

https://bugzilla.gnome.org/show_bug.cgi?id=364566
2014-12-07 23:28:52 -05:00
Matthias Clasen
888304b172 Minor documentation fixes 2014-12-05 20:10:07 -05:00
Lapo Calamandrei
268efd1475 textview: remove osd style class from touch selection popover
The touch-selection class is sufficient since that needs special
casing whatever.
2014-11-15 16:09:39 +01:00
Matthias Clasen
f93795d272 Add a style class for touch selection popovers 2014-10-07 13:27:52 -04:00
Matthias Clasen
0004e667ab GtkTextView: Add a monospace property
This is a convenient shortcut for a common case. It is implemented
by adding a .monospace style class to the text view, and letting
the theme decide about the monospace font to use.
2014-10-07 00:39:42 -04:00
Benjamin Otte
91467a45fc stylecontext: Deprecate functions
- gtk_style_context_get_background_color()
- gtk_style_context_get_border_color()

Those functions shouldn't be used anymore, because they don't represent
anything from the CSS styling we support. The background color often
isn't used due to background images and there are actually 4 different
border colors (1 for each side) - if there isn't also a border image in
use.
2014-10-03 06:18:06 +02:00
Matthias Clasen
459bdbb143 Revert "Make Ctrl-u and Ctrl-k work in GtkTextView too"
This reverts commit 5744bb3cf1.

This causes conflicts with already existing shortcuts e.g.
in gedit.
2014-09-28 11:43:08 -04:00
Matthias Clasen
5744bb3cf1 Make Ctrl-u and Ctrl-k work in GtkTextView too
It doesn't make sense to have them work in entries, but not here.
2014-09-26 17:53:07 -04:00
Paolo Borelli
290a19e93d TextView: clear the background using the default bg color
Try to tidy up how the background is set on the textview:
 *) the .view class should be applied only to the text window, not
    to the margins
 *) when setting the background on the margins we must use .left etc
 *) use context_set_bg instead of manually setting the color

https://bugzilla.gnome.org/show_bug.cgi?id=735368
2014-08-26 09:55:53 +02:00
Carlos Garnacho
5bc437d2bc textview: Unset bubble timeout ID right after requesting the clipboard
The timeout ID used to be unset after we got the targets from the
clipboard, but there's still a moment between the clipboard request and
the GDK_SELECTION_NOTIFY event that the ID points to an already gone
timeout.
2014-08-22 13:24:56 +02:00
Carlos Garnacho
c5839708cc textview: Make multipress gesture accept all buttons
That gesture is meant to handle clicks on multiple buttons, so unset
the GDK_BUTTON_PRIMARY default. Also, remove unnecessary boilerplate
with the new GtkGestureSingle/GtkEventController defaults.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:40 +02:00
Matthias Clasen
7d55355d4d GtkTextView: Preserve the cairo context around draw_layer
Otherwise, draw_layer might unintentionally wreak havoc on the
regular drawing that happens between the two draw_layer calls.
2014-08-13 09:18:08 -04:00
Matthias Clasen
7450277708 GtkTextView: Change draw_layer signature
Vfuncs should really take 'this' of the right type - the type
that the vfunc is added in.
2014-08-13 09:18:08 -04:00
Carlos Garnacho
9d7f1caca7 textview: Avoid relocating adjustments on ::size-allocate while these are animating
An animation may be scheduled while the textview content changed in size, so the resize
queued would just unset the animation and set the adjusments with a current value,
defeating gtk_text_view_scroll_to_iter(). In this case, just avoid the adjustment change,
as there is a target value on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=733406
2014-08-03 20:12:47 +02:00
Alexander Larsson
5b53eb287c textview: Add draw_layer vfunc
This allows subclasses to render things below and above the text
in the text view. This allows e.g. GtkSourceView to highlight the
cursor row and to render overlays for colum 80. This used to be done
by rendering before/after chaining up to the parent, but that doesn't
work anymore since the view now renders a background, and due to the
use of the pixel cache.
2014-07-28 16:23:33 +02:00
Alexander Larsson
4fe051bb4a Revert "GtkTextView: Fix regression in GtkSourceView drawing"
This reverts commit 1ac13435b7.

We want to instead replace this with special vfunc for drawing
below/above the main text so that gtksourceview can use it.
2014-07-28 16:23:33 +02:00
Sébastien Wilmet
9527205291 GtkTextView: use GSlice
GSlice is better for allocating structs.

https://bugzilla.gnome.org/show_bug.cgi?id=733407
2014-07-20 12:26:01 +02:00
Matthias Clasen
34245515e5 Add a 'touchscreen' debug flag
This has the same effect as the GTK_TEST_TOUCHSCREEN environment
variable, but can be toggled at runtime.
2014-07-10 10:12:02 -04:00
Carlos Garnacho
7178e342b1 textview: Call gtk_widget_size_allocate() on children widgets invariably
There was this hack, taken verbatim from GtkCList according to the comment,
that would recursively translate the allocation during scrolling, and set
it on children widgets through the direct gtk_widget_set_allocation() setter.

Since commit 4f89eb05cf, this has caused the wrong clipping areas to children
widgets of a textview. The reasons for this seem lost in time, and the approach
seems indeed wrong for windowed widgets as the repositioning of those windows
couldn't happen.

So replace all of this with just a gtk_widget_size_allocate() call, which does
work ok for the children widgets embedded in the "multiple views" gtk demo, and
ought to work for every other widget.

https://bugzilla.gnome.org/show_bug.cgi?id=732900
2014-07-09 22:57:52 -04:00
Carlos Garnacho
ea19e595a1 textview: Fix cursor positioning oddities when scrolling through Pg Up/Down
Use the adjustment target value when repositioning the cursor, and remove the
checks that ensured the cursor was made onscreen immediately, as there will
be definitely a delay on animated adjustment changes.
2014-07-08 21:14:41 -04:00
Carlos Garnacho
6aa8511495 textview: Use adjustment animations in gtk_text_view_scroll_to_iter()
This makes keyboard-triggered scrolling animated, as this function is
used underneath in order to make the cursor onscreen after it is
displaced.
2014-07-08 21:14:41 -04:00
Carlos Garnacho
f7e983a4c9 textview: Use the adjustment target value to figure out if keynav failed
When moving the cursor, compare current adjustment value with the post-animation
target value, in order to avoid false "keynav failed" positives as the animation
hasn't started yet, so dx/dy are still 0 at that time.
2014-07-08 21:14:41 -04:00
Benjamin Otte
2fde5e95ee textview: Fix compiler warning
No need to use braces anymore.
2014-07-07 20:06:39 +02:00
Matthias Clasen
b04e3835cb GtkTextView: Animate keybindings 2014-07-02 20:58:16 -04:00
Paolo Borelli
715b8744f5 TextView: render the background of border windows
Set the .top, .left, etc css classes and render the background
of the border windows.
Change the reftest implementation accordingly.
2014-06-15 18:57:06 +02:00
Carlos Garnacho
05810f80a4 textview: Unobscure the mouse cursor on motion events
This used to be done before the gestures port, and was removed
accidentally, so keep the motion_notify_event handler just for
this, and fallback to having those events handled by gestures
too.
2014-06-12 23:23:43 +02:00
Matthias Clasen
6e64bc13de GtkTextView: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:12 -04:00
Carlos Garnacho
995b6d1fd4 textview: Only trigger drag gesture on GDK_BUTTON_PRIMARY
This gesture was only meant to react on GDK_BUTTON_PRIMARY (either
through real pointer events, or implicitly assumed from touch events),
as it used to behave before gestures. Otherwise the gtk_drag_begin*()
call assumes being triggered by button 1, and the drag misbehaves
because that button isn't really in the state mask.

https://bugzilla.gnome.org/show_bug.cgi?id=731016
2014-05-31 15:11:05 +02:00
Carlos Garnacho
907e9f1946 gtk: Update GtkGesture users to the GtkPropagationPhase semantics change
Mainly doing s/TARGET/BUBBLE/ on the fully ported widgets, but GtkTreeView
where the double click handler has moved to GTK_PHASE_TARGET so it runs
parallelly to the still existing event handlers.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
d05a9f9a7b gesture: Replace gtk_gesture_attach/detach with event controller API
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.

All callers have been updated.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
c9f54aef69 textview: Check first whether the sequence is handled, fetch later the event
And always unset/hide the selection popover if unhandled, that means the
sequence went grabbed/claimed somewhere else and cancelled here.
2014-05-23 19:54:33 +02:00
Carlos Garnacho
bd5fb3a09f textview: Show the magnifier popover a bit farther from the touch position
Somewhat arbitrary at the moment, would be nice to have minimal units
support for this, or at least hidpi support.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
b2d56c588a textview: Improve touch popover interaction
Presses alternatively show and dismiss the popover, the popover is still
always shown invariably after any dragging happens (either text selection,
or dragging a text handle)
2014-05-23 19:54:31 +02:00
Carlos Garnacho
24f20864b4 textview: Set up controllers on the GTK_PHASE_TARGET propagation phase
This way events are managed by gestures in the event handlers themselves,
respecting the execution order already assumed by subclasses around.
2014-05-23 19:54:30 +02:00
Carlos Garnacho
d97e4bf6b7 textview: Convert gestures' coordinates to text window ones
And make some code shared between multipress/drag gesture.
2014-05-23 19:54:30 +02:00
Carlos Garnacho
f47138b653 textview: Use GtkGestureDrag for text selection/DnD
remaining code in button press/release, motion notify, and grab
notify handlers has been shuffled to be managed by this gesture.
2014-05-23 19:54:30 +02:00
Carlos Garnacho
a4da4f8dfa textview: Use GtkGestureMultiPress for click handling
The button press handler is no longer necessary, and most of its
code has been shuffled into the GtkGestureMultiPress::pressed
handler.
2014-05-23 19:54:30 +02:00
Carlos Garnacho
2ef4f1bc61 textview: remove superfluous GTK+ grabs 2014-05-23 19:54:25 +02:00
Matthias Clasen
49cf5142ba Deprecate GdkColor
It has been replaced by GdkRGBA. Time to make it official.
http://bugzilla.gnome.org/show_bug.cgi?id=636695
2014-05-22 09:09:55 -04:00
Cosimo Cecchi
a3cbcc6451 textview: always use interior focus 2014-05-09 11:02:42 -07:00
Sébastien Wilmet
d69d57afa7 textview: inline a function
gtk_text_view_move_cursor_internal() was exactly the same as
gtk_text_view_move_cursor(), and was called only in the latter function.

https://bugzilla.gnome.org/show_bug.cgi?id=727908
2014-04-13 14:04:11 -07:00
Benjamin Otte
6e1fc27528 textview: Call map/unmap functions on pixel cache
https://bugzilla.gnome.org/show_bug.cgi?id=726475
2014-04-10 00:16:54 +02:00
Bastien Nocera
f71f7215ab all: Name more idles and timeouts
Following up from 438cd857c4,
name more timeouts and idles.

The original grep was missing checking for gdk_threads_add_*()
functions (at least for some of the files).

https://bugzilla.gnome.org/show_bug.cgi?id=726870
2014-03-26 20:09:30 -04:00
Carlos Garnacho
3693045566 textview: Mind the lateral windows when setting handles/popovers positions
If a textview had lateral windows that might displace the text window, the
handles and popovers would appear displaced. Those lateral windows aren't
affected by RTL/LTR settings, so just checking for left/top is ok here.
2014-03-17 18:26:41 +01:00
Carlos Garnacho
a86ca5c561 textview: Postpone text handles creation until when needed
This is only necessary for touch devices, so unnecessary on many setups.
2014-03-10 23:07:21 +01:00
Carlos Garnacho
7b0a5674e2 textview: Postpone magnifier creation until when needed
This is only necessary for touch devices, so unlikely on many setups.
2014-03-10 23:07:21 +01:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
William Jon McCann
326da2da58 docs: don't use <anchor> 2014-02-07 15:40:52 -05:00
William Jon McCann
cb6483d382 docs: use apostrophe in *'d 2014-02-07 13:39:53 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
a22358c0c0 docs: use ` instead of <literal> 2014-02-04 18:24:29 -05:00
Matthias Clasen
30cc1512e6 Docs: Use markdown for lists
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
2d003553e8 docs: don't use <emphasis>
It is a little heavy handed. The text can speak for itself.
2014-01-28 02:02:05 -05:00
Carlos Garnacho
5bb259bc6a textview: Set GTK_STYLE_CLASS_OSD on text selection popovers 2014-01-22 17:10:06 +01:00
Carlos Garnacho
1d495cbafd popover: Add a "modal" boolean property to GtkPopover
This property is TRUE by default, when a popover is modal, it
will automatically set a GTK+ grab on the popover, and grab
the keyboard focus into the popover.
2014-01-22 17:10:06 +01:00
Carlos Garnacho
4a8a2286e1 texthandle: Remove relative_to API
It's unused now, GtkTextHandle uses widget coordinates.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
d7acd29421 textview: Set use-underline in popover GtkToolButtons 2014-01-22 17:10:05 +01:00
Carlos Garnacho
3e6462c71b textview: Use GtkMagnifier on touch selection
The magnifier renders the area covered by the finger, making it easier to follow
the text being selected.
2014-01-22 17:10:05 +01:00
Carlos Garnacho
caeb896096 Introduce GtkPopover
Now that the GtkBubbleWindow object has been cleaned up and made
more generic, rename it as GtkPopover and make it public.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
1813c8391c textview: Avoid bubblewindow popup/popdown API
Besides setting all positioning properties at once, popup() would just
show the widget, so do that directly after just updating the position.
2014-01-22 17:10:04 +01:00
Carlos Garnacho
923da6a8b8 bubblewindow: Make it relative to GtkWidget coordinates
GdkWindows are gone now from the API, the pointed_to rectangle
is from now on relative to the widget allocation. GtkTextView
and GtkEntry were updated to adapt to this change.
2014-01-22 17:10:04 +01:00
Alexander Larsson
664fe89f6e GtkTextView: Fix scrolling of added children
The behaviour of gtk_text_view_add_child_in_window() used to be
quite broken. It scrolled with the window during scrolling, then
jumped to the absolute position when the widget resized. Furthermore,
in 3.10 we broke the first feature, making it always be fixed.

The "proper" way to handle this is to always follow scrolling. This
is what the only user so far (gedit) wants, and if you want some
kind of overlay you should use GtkOverlay instead.

So, this changes the behaviour to something that is internally consistent
and works. I.e. all added widgets scroll with the textview as needed.

https://bugzilla.gnome.org/show_bug.cgi?id=711826
2014-01-10 12:08:52 +01:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Alexander Larsson
79e5069dff GtkTextView: Fix horizontal scrolling
We didn't properly invalidate when scrolling horizontally.

https://bugzilla.gnome.org/show_bug.cgi?id=708019
2013-10-02 16:23:41 +02:00
Alexander Larsson
1ac13435b7 GtkTextView: Fix regression in GtkSourceView drawing
GtkSourceView draws before chaining upo to GtkTextView and assumes
that this will be visible, but the pixelcache will just overdraw
that with background.

So, we stop drawing the background to the pixel cache and instead
make it an CAIRO_CONTENT_COLOR_ALPHA surface to make the previously
drawn content see through.

This is slower, but more backwards compatible.

https://bugzilla.gnome.org/show_bug.cgi?id=708423
2013-10-02 16:23:41 +02:00
Sébastien Wilmet
f75aa5fdb4 GtkTextView: add create_buffer virtual method pointer
This allows subclasses of GtkTextView that require a corresponding
subclass of GtkTextBuffer to automatically do the right thing when
constructed with a NULL buffer. An example of this is GtkSourceView
which requires a GtkSourceBuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=708584
2013-09-26 18:36:20 +02:00
Christian Hergert
9a45712ad6 textview: use pixelcache rendered area to inform invalidation region.
Use the pixelcache rendered area to inform what part of the cache should
be invalidated upon changes to the underlying textlayout.

By rendering the background to the pixelcache, we can avoid the need to
use RGBA content.

Also, we're using the pixel cache on the text windows bin_window (see
gtk_text_view_get_window) so we need to register the invalidation handler
on that, otherwise the region passed to the invalidate handler will get
clipped to the visible region.

https://bugzilla.gnome.org/show_bug.cgi?id=707244
2013-09-09 10:47:30 +02:00
Christian Hergert
0eb8479256 textview: only set invalidate handler for text window. 2013-09-06 15:57:22 -07:00
Paolo Borelli
fa3a0963ee textview: Use guint since we specify ": 1" 2013-09-01 12:16:27 +02:00