| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These days exposure happens only on the native windows (generally the
toplevel window) and is propagated down recursively. The expose event
is only useful for backwards compat, and in fact, for double buffered
widgets we totally ignore the event (and non-double buffering breaks
on wayland).
So, by not setting the mask we avoid emitting these events and then
later ignoring them.
We still keep it on eventbox, fixed and layout as these are used
in weird ways that want backwards compat.
|
|
|
|
|
|
|
|
|
| |
This changes textview to share the style context with the pixelcache.
Doing so allows pixel cache to optimize the surface creation and use
a CAIRO_CONTENT_COLOR instead of CAIRO_CONTENT_COLOR_ALPHA when
appropriate.
https://bugzilla.gnome.org/show_bug.cgi?id=754658
|
|
|
|
|
| |
Introduce a GTK_DEBUG_CHECK() macro and use it to check for
GTK_DEBUG flags everywhere. Also guard all such places by
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Same as we did for the entry in the previous commit.
Previously, we just hid the cursor if a key event was adding text,
but not when you used backspace, or Ctrl-V. Rearrange things so that
we obscure the cursor whenever the buffer contents change while we
are handling key events.
https://bugzilla.gnome.org/show_bug.cgi?id=754535
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The purpose of this patch is to fix regressions in GtkTextView
scroll behaviours due to commit d138156.
( addition of padding and margins to the view )
Adding some padding is done by, for example, in inspector css tab with:
GtkTextView {
padding: 10px 10px 10px 10px;
}
and adding margins, by changing one of *-margin properties
( * standing for left/right/top/bottom ) or the corresponding
accessor functions.
Understand that none of these bugs are easy to trigger.
What's happened is that a old and wrong version of the code of the code
( lost in the mean time ) was pushed.
These bugs are best seen with wrap mode set to off.
The commit 8baab8f fix a first regression.
This one is about:
- Cursor going out of the view at line ends instead of being visible
or triggering the horizontal scroll.
- Padding not displayed correctly
when moving cursor at beginning/end of lines
- When horizontal scroll position not at left, cursor can make scroll
by more than one character (you need left padding to see this )
- Moving the cursor arround, the rendered text can be shitted in x or y.
( fixed by converting adjustment float values
to integer before calculations )
It can be observed by going down with the cursor more
than the view height then going up
- retval return value of _gtk_text_view_scroll_to_iter wrong in some cases
In addition, this patch re-factor priv->top_border
in screen_dest.y calculation
Of course, all GtkTextView and GtkSourceView based app were impacted
by these bugs ( gedit for example, see bug 754147 )
https://bugzilla.gnome.org/show_bug.cgi?id=753815
https://bugzilla.gnome.org/show_bug.cgi?id=75815
|
|
|
|
|
|
| |
This reverts commit 016f6596e76a69844d2832cba07e10d9b60a2b28.
Pushed prematurely by accident.
|
|
|
|
|
|
|
|
| |
Due to the introduction of view's margin and padding,
some bugs in scrolling behaviour have come.
This commit fix them.
https://bugzilla.gnome.org/show_bug.cgi?id=753815
|
|
|
|
|
| |
Under some cases, we can get NULL back for the cursor. Simply use
g_clear_object() to handle that case gracefully.
|
|
|
|
|
|
|
| |
When you move line by line, only padding is
automaticly shown and you need to use Page key to show margin.
This commit also fix cursor going out of the screen bug.
|
|
|
|
|
|
|
| |
Add API to set top and bottom margins, and add the CSS padding
from the theme to the programmatically set margins.
https://bugzilla.gnome.org/show_bug.cgi?id=406159
|
|
|
|
| |
Instead of repeated manual tests.
|
|
|
|
|
|
|
| |
This changes GTK+ to use gdk_cursor_new_from_name() with the
'standard' css names, instead of GdkCursorType.
https://bugzilla.gnome.org/show_bug.cgi?id=652085
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
show_or_hide_handles() tries to disable visibility when the popover is
shown, although it triggers a bit late, and lets the handles flash briefly
if both popover and handles try to show at the same time (eg. when
pressing on the selection of a previously unfocused textview, the handles
were previously hidden, so they try to show again on focus in).
|
|
|
|
|
|
|
|
|
|
|
|
| |
The handles might fall outside the visible area, and shouldn't be shown
then. Just call gtk_text_view_update_handles() which will perform these
checks, and keep the handle conveniently hidden.
This was leading to unexpectedly visible handles (and in the
wrong/previous position, the handle code doesn't relocate the widget
it's about to hide) when "select all" was selected in the popover on
a textview needing scrollbars.
and extending the selection beyond the view above and/or below.
|
|
|
|
|
| |
This makes them point to the correct place, given the theme supports
this.
|
|
|
|
| |
This is an initial attempt at implementing double-tap selection.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
There were some cases where we left a handle visible
during mouse interaction, which is a little weird.
|
|
|
|
| |
Otherwise, it looks cramped, and we end up under the finger.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Again, our habit to use -1 as an unset value for enum types.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
commit aa1b7fab9c6a2b39 introduced a misuse of G_UNLIKELY in
several places. Fix all those.
|
|
|
|
|
|
| |
... and _gtk_css_style_property_changes_affect_font().
Replace it with _gtk_css_style_property_get_mask_affecting().
|
|
|
|
| |
Fixes bug 710612
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This prevents warnings that would otherwise happen when
the magifier is finalized.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The X coordinate is dependent on touch position, but Y is stepped.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
We currently handle KP variants of some keys, but not consistenly.
https://bugzilla.gnome.org/show_bug.cgi?id=364566
|
| |
|
|
|
|
|
| |
The touch-selection class is sufficient since that needs special
casing whatever.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|