Commit Graph

50720 Commits

Author SHA1 Message Date
Daniel Boles
513b56ce0f HighContrast: Regenerate CSS files with sassc 2017-05-31 18:47:57 +01:00
Daniel Boles
dcdd31e6f3 HighContrast: Update parse-sass.sh; remove Gemfile
Make parse-sass.sh use sassc instead of the old Ruby method.
2017-05-31 18:46:57 +01:00
Daniel Boles
796f9b5bfb themes: Square corners on fullscreen win headerbar
Totem uses a fullscreen window with a headerbar at the top, and without
this change, that headerbar has rounded corners, which look different
from a maximised window and let video content show through beneath.

https://bugzilla.gnome.org/show_bug.cgi?id=770513
2017-05-31 08:16:51 +01:00
Daniel Boles
fc96fce462 HighContrast: Restore files to regenerate CSS
I think parse-sass.sh needs updated to match what Adwaita does now, but
for now, this is sufficient to let us regenerate HighContrast again.
2017-05-31 08:16:35 +01:00
Rico Tzschichholz
a4e80efee7 gdk/gtk: Fix Since tags for 3.92 symbols
In addition to 406db15066
2017-05-30 15:10:25 +02:00
Debarshi Ray
385a46b5c0 wayland: Don't warn if the display is lost, skip exit handlers
There is no need to have every application log a warning when the
Wayland display server goes away, and we are using _exit instead of
exit elsewhere.

This is also what the X11 backend does (see gdk_x_io_error).

https://bugzilla.gnome.org/show_bug.cgi?id=745289
2017-05-30 09:15:57 +02:00
Daniel Boles
406db15066 gdk/gtk: Fix more AVAILABLE_IN annotations to 3_92 2017-05-28 14:20:19 +01:00
Daniel Boles
b6e13847d5 gdkevents.h: Fix version annotations on new funcs 2017-05-27 15:25:35 +01:00
Carlos Garnacho
b894c35008 gtk: Make GtkPointerFocus refcounted
In order to make it really sure the GtkPointerFocus is valid while being
removed from a GtkWindow.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
690eb8ede6 gtkwidget: Lookup the event target when cancelling GdkEventSequences
We were getting the toplevel most often here, so the gestures weren't
properly cleaned up.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
0d7fe2ec09 gtk: Check implicit grab status before sending crossing events
As we now refrain from sending the crossing events if there's an
implicit grab, those events must be sent on button release when
the implicit grab is broken.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
f5fde52d61 gtk: Refactor crossing event synthesization into a separate function
This is now called outside update_pointer_focus_state() with the events
that actually matter (i.e. pointer ones, so no sequence == NULL checks)
2017-05-25 16:25:59 +02:00
Carlos Garnacho
e892e20841 gtk: Rework pointer cursor selection
Check the grab widget (both explicit and implicit) and check for a cursor
from the target widget up to this grab widget. If the target widget is
outside the grab widget, only the grab wigdet's cursor will be checked.

This also means that we have to ensure the cursor is updated on button
releases, as an implicit grab being deactivated must trigger a cursor
lookup from the target widget.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
ace686dba9 gtktreeview: Fix invalidation coordinates
We must account for the widget allocation now that there is no view_window.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
9f2e7edc3b gtkiconview: Fix invalidation coordinates
We must account for the widget allocation now that there is no view_window.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
f8bc56dd55 gtkgesture: Consume button release/touch end events if gesture was claimed
In these situations we must perform the "is it claimed" check before removing
the (touch)point, as doing so when the gesture is empty will be too late if
the gesture actually claimed input.
2017-05-25 16:25:59 +02:00
Timm Bäder
8371b6b857 main: Automatically (un)set PRELIGHT state on widgets 2017-05-25 16:25:59 +02:00
Timm Bäder
f6e0850ff7 Gesture: Remove window property completely
These are just leftovers, it's already gone from public API and the
_{set,get}_property implementations.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
b62b33c1d9 gtk: Fix event delivery on GTK_PHASE_TARGET controllers
Look up the event target, not the "event widget" which is based on the
event window, and thus points to the toplevel.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
3a15c8241e gdk: Remove synthetic crossing event emission due to geometry changes
This just applied to child windows, but now GDK should just take care of
toplevels, which shall get crossing events from the windowing when the right
conditions apply.

Removing this code fixes confused crossing state in widgets and messed up
window_under_pointer tracking (Which now is meant to be toplevels) when any
of the remaining child GdkWindows trigger these crossing events.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
61dd925b32 gdk: Ensure to implicitly deactivate grabs when an impl window is hidden
For some reason this wasn't done on windows with an impl, but it totally should.
Probably hidden by grabs in menus and somesuch being done on a child window.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
ee894903c7 gtkpopover: Use event coordinates right away to detect clicks outside.
There's no need anymore to translate coordinates, the event already contains
popover-relative ones.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
47e505781e gtkwindow: Implement ::pick to extend picking to popovers.
This makes interaction possible with popovers again.
2017-05-25 16:25:59 +02:00
Timm Bäder
eef33d34d4 widget: Make sure we're not calling _get_parent on NULL
We already issue the first _get_parent call before even entering that
loop, so make sure `parent` is not NULL. This happens when event_widget
is already a toplevel, and this change fixes row-dragging in treeviews.
2017-05-25 16:25:59 +02:00
Timm Bäder
34fdc51392 Constify GdkEvent parameters in gtk_get_event_widget and _event_target 2017-05-25 16:25:59 +02:00
Timm Bäder
19174d8d94 flowbox: Fix motion notify handler
Same story as in GtkListBox.
2017-05-25 16:25:59 +02:00
Timm Bäder
2ad2ecad44 flowbox: Fix child item selection 2017-05-25 16:25:59 +02:00
Timm Bäder
dd836fff35 flowbox: Fix child item allocation 2017-05-25 16:25:59 +02:00
Timm Bäder
030b96cb49 scrolledwindow: Avoid critical when removing source
Make sure indicator->conceil_timer is actually set before trying to
remove it.
2017-05-25 16:25:59 +02:00
Timm Bäder
084b356d1e testlist: Fix custom css 2017-05-25 16:25:59 +02:00
Timm Bäder
e54d8a6114 scrolledwindow: Calculate indicator coords relative to scrolledwindow
The event coordinates we get are relative to the scrolledwindow
coordinates.
2017-05-25 16:25:59 +02:00
Timm Bäder
782477188a scrolledwindow: Stop checking event->detail in leave-notify
This is obsolete and resulted in sometimes stuck .hovering style classes
on scrollbars.
2017-05-25 16:25:59 +02:00
Timm Bäder
5ae9ca79e4 linkbutton: Fix hand cursor when hovering
Use the new gtk_widget_set_cursor instead of setting it on the
GdkWindow.
2017-05-25 16:25:59 +02:00
Timm Bäder
3e44a3920a listbox: Fix row hovering
Drop the in_widget flag since motion events the listbox receives are
always inside the listbox. Also drop the manual coordinate translation
code using GdkWindows.
2017-05-25 16:25:59 +02:00
Timm Bäder
a0016758a8 widget: Copy event in gtk_widget_event and _captured_event
To ensure that we never translate the coordinates to widget coordinates
twice.
2017-05-25 16:25:59 +02:00
Timm Bäder
c83b8d17ff meson: Add gtkpointerfocus.c to sources 2017-05-25 16:25:59 +02:00
Timm Bäder
f5e8d7a4e2 window: Hide titlebox when undecorated
We don't draw or size-allocate the titlebar when the window is
fullscreen or undecorated, so reflect this by setting it to
!child_visible. This can happen when changing the value of the decorated
property while the window is shown.
2017-05-25 16:25:59 +02:00
Timm Bäder
81cdc8713c combobox: Only react to UP/DOWN scroll events
The old else block scrolled down for everything except GDK_SCROLL_UP
scroll events, e.g. for smooth scroll events.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
40ab7e1c95 gtkmenu*: Simplify event handling
Instead of delegating on the parent shell of a menu item/shell on a variety
of situations, Simplify event handling so:
1) Menu item selection is handled entirely on GtkMenuItem through crossing
   events.
2) The deepmost menu shell handles clicks inside and outside of it.

This avoids the rather hard to follow gtk_widget_event() calls going on all
throughout the handling of crossing and button events, and makes menus work
again.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
33c5f3c193 gtkmain: Add API to get the target of a GdkEvent
This can be used on grabbing situations to determine the target of
the event. This mainly matters for GtkMenu.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
da56fae5df gtkmain: Ensure there is a current event handling crossing events
The "current event" will be the real one that is triggering the crossing
notifications, not the synthesized events.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
03a63204c1 gtkmain: Ignore GDK_CROSSING_GRAB/UNGRAB crossing events for picking purposes
Especially with owner_events=TRUE, this doesn't mean anything for picking, as
events will be reported as usual inside the application.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
65de0ebea3 gdk: Make it possible to attach user data to GdkEvents
As event->any.window is the toplevel, this is not useful anymore to
determine the window/widget that is the target for this event. Add
helper functions to attach user data to GdkEvents so the target
widget can be stored on the gtk/ side.

These calls should be made private with the rest of GdkEvent related
API.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
5483b9db2d gtkmain: Avoid doubly propagation of enter/leave events from windowing
Crossing events are already generated when picking the new pointer position,
so we don't have to propagate the windowing crossing event as-is.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
f9924b7e3e gtknotebook: Drop drag_window
It is not necessary anymore to implement tab DnD, since we just render
it on top.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
2c7102b557 gtkiconview: Remove view GdkWindow
It's not necessary anymore for clipping nor receiving events. So just
remove it. The event handling code was expecting events in bin_window
coordinates, and have been updated to relying on widget-relative coords.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
2f6c4ef68d gtkviewport: Remove view window
It is not really necessary for clipping nor receiving events.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
547370651b gtkrevealer: Remove view window
It's not necessary anymore for either clipping or event delivery
2017-05-25 16:25:59 +02:00
Carlos Garnacho
94094611bc gtkpaned: Remove per-child windows
Those are no longer necessary for clipping nor receiving events, so just
remove them.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
ae43ca7e49 gtklayout: Remove widget window
It can be entirely replaced by a clip allocation on the widget.
2017-05-25 16:25:59 +02:00