Carlos Garnacho
3dfab962fa
gtk: Implement per-focus implicit grabs
...
Unlike GTK+ grabs which are global to all/one device, the implicit grab
is per focus, which means each may have implicit grabs on different or
the same widget.
2017-05-25 16:25:58 +02:00
Carlos Garnacho
79e267a330
gtk: Implement cursor updates
...
As we don't obey GdkWindow cursors anymore, someone must set those.
Use the private Gtkwidget API at the moment.
2017-05-25 16:25:58 +02:00
Carlos Garnacho
e25fcf983a
gtk: Handle events with coordinates in toplevel-relative ones
...
Implement target finding per-pointer/touchpoint through GtkPointerFocus and
_gtk_toplevel_pick(). Focus changes are handled through the emission of
crossing events between the old target and the new one.
2017-05-25 16:25:58 +02:00
Carlos Garnacho
53c297436d
gtk: Add private _gtk_toplevel_pick() method
...
This function returns both the widget at the given toplevel coordinates,
and the translated x/y in widget relative coordinates.
2017-05-25 16:25:58 +02:00
Timm Bäder
6b12e3948e
gtkmain: Fix code example
...
gtk_init doesn't take parameters anymore
2017-04-25 20:30:37 +02:00
Murray Cumming
158015be6c
docs: Remove mentions of gtk_init_with_args().
...
Because it has been removed: See commit 7e8eb3ddcd
2017-03-17 21:12:12 +01:00
Timm Bäder
ea897c6df4
Remove gtk_widget_show_all
2017-01-20 21:37:04 +01:00
Chun-wei Fan
3629def0d0
gtkmain: Fix build on Windows
...
gtk_init() removed its support for supporting arguments, so we ought to do
likewise for Windows, which actually defines items that call gtk_init()
the old way (and also get rid of argument support in those functions,
since the direction is to not support them).
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-01-20 19:50:02 +08:00
Benjamin Otte
f8b6831c98
gtk: Register GSK resources at startup
...
That way they show up in the resource list in the inspector even when
running with the Cairo renderer.
2017-01-20 01:19:02 +01:00
Matthias Clasen
7a13715736
Drop arguments from gtk_init
...
This is our ultimate goal: no more commandline argument handling.
Lots of callers will have to be updated.
2017-01-19 13:21:12 -05:00
Matthias Clasen
f2ee897009
Simplify initialization code
...
Now that gtk_get_option_group and gtk_parse_args are no longer
public, we can get rid of them.
2017-01-19 13:21:12 -05:00
Matthias Clasen
64b40c65ae
Drop the --gtk-debug and --gtk-no-debug options
...
We have environment variables that cover this.
2017-01-19 13:21:12 -05:00
Matthias Clasen
4cfcca7997
Drop the --g-fatal-warnings argument
...
We don't need it, GLib has an environment variable for this.
2017-01-19 13:21:12 -05:00
Matthias Clasen
9c52f6b3ca
Drop the --gtk-modules argument
...
We don't need it; the environment variable is enough.
2017-01-19 13:21:12 -05:00
Matthias Clasen
63d6e2d8e2
Don't export gtk_get_option_group
...
We want to get rid of commandline option handling in GTK+.
This is a step in that direction.
2017-01-19 13:21:12 -05:00
Matthias Clasen
42fd5a0b8b
Stop exporting gtk_parse_args
...
We want to stop handling commandline arguments, and that is the
sole purpose of this function. So it has to go
2017-01-19 13:21:12 -05:00
Matthias Clasen
7e8eb3ddcd
Drop gtk_init_with_args
...
We want to simplify our initialization code and remove all commandline
argument handling from it. The first stop for this is to reduce the
number of gtk_init variants we have.
2017-01-19 13:21:12 -05:00
Matthias Clasen
507a1e4d7a
Make GTK_DEBUG=interactive work better
...
We currently have various ways to initialize GTK+, and not
all of them were supporting this way of bringing up the
inspector. Fix this.
https://bugzilla.gnome.org/show_bug.cgi?id=776807
2017-01-07 19:16:15 -05:00
Timm Bäder
7d0e534969
gtkmain: Correctly notify all widgets of a grab
2017-01-07 17:19:30 +01:00
Benjamin Otte
def94f03e2
debug: Add GTK_DEBUG=snapshot
...
This causes the snapshotting algorithm to dump all widget nodes into
their own container node. We then name that group accordingly (ie
"GtkSwitch<0xdeadbeef>") so you can easily see which node belongs where.
The feature is toggleable in the inspector's visual tab.
There's a few problems with it, becuse GtkSnapshot optimized container
nodes away if they are not needed, so we are losing some widgets...
2016-12-20 19:26:40 +01:00
Benjamin Otte
22a657004b
debug: Remove pixel-cache debug categories
...
We have no more pixel cache, so they are kind of useless.
2016-12-20 19:26:40 +01:00
Matthias Clasen
3414f10bad
Drop the GDK_PRIVATE_CALL mechanism
...
We don't need to do this extra complication anymore, since
we're now living inside a single shared library.
2016-11-23 19:31:16 -05:00
Benjamin Otte
48f5df5318
gtk: Add back infrastructure for GTK_DEBUG=updates
...
Includes the ability to turn on updates in the inspector. Animations are
now run via a tick function which allows us to neatly overlay a
semi-transparent red rectangle and fade it out over time.
It also probably enables way more, but somebody with more UI neatness
than me needs to figure out what it eanbles first...
2016-10-27 05:07:23 +02:00
Benjamin Otte
1df8b15711
gtk: Remove gdk_window_invalidate() from docs
...
And replace its mentions with gtk_widget_queue_draw().
2016-10-27 05:07:23 +02:00
Timm Bäder
6c911c8171
remove GTK_DEBUG_PLUGSOCKET
...
Both GtkPlug and GtkSocket are gone so this doesn't make a lot of sense
anymore.
2016-10-22 19:30:01 +02:00
Timm Bäder
feb8975a4b
gtkmain: Remove deprecated key snooper API
2016-10-18 00:29:17 +02:00
Emmanuele Bassi
fc9826fb41
Remove declarations for getresuid()/getresgid()
...
Back in 2001, their prototypes were missing from system headers, but
since glibc 2.3.2 they are defined in unistd.h if _GNU_SOURCE is
defined.
2016-10-17 11:44:11 +01:00
Benjamin Otte
e76ba9a3c3
gdk: Remove gdk_window_set_debug_updates()
...
The update tracking code was ugly and using deprecated drawing APIs. It
was also in the wrong place.
So instead of trying to keep it working, I'll remove it. We need to find
a better way to put it and make it work there.
2016-10-16 18:18:58 +02:00
Matthias Clasen
8a7d0ab481
Make gtk_init_with_args behave as documented
...
This docs say it should return FALSE if the display can't be opened,
but it was failing.
https://bugzilla.gnome.org/show_bug.cgi?id=771959
2016-09-27 15:12:47 -04:00
Carlos Garnacho
3a6d0ff2ab
gtk: Add minimal handling of pad events
...
No real handling is yet performed, to be done through a GdkEventController
https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Emmanuele Bassi
2c7b21718f
Simplify the widget rendering entry point
...
Now that GDK has the appropriate API, we can simplify the widget drawing
code into a single function.
https://bugzilla.gnome.org/show_bug.cgi?id=766675
2016-06-09 17:45:40 +01:00
Matthias Clasen
cca894b912
Use a cheaper way to store debug flags
...
This was the most frequent use of qdata *by far*.
2016-05-06 06:44:28 -04:00
Matthias Clasen
c50e774b29
Fix a typo
2016-05-06 06:44:28 -04:00
Matthias Clasen
37b70a9733
Use qdata for debug flags
...
This avoids some overhead.
2016-04-19 23:26:57 -04:00
Matt Watson
f2979323bf
progresstracker: add GTK_SLOWDOWN environment variable
...
As we consolidate widgets to use progress tracker, this will allow
us to control the speed of all animations in a centralized place
2016-04-08 16:09:29 -07:00
Matthias Clasen
cb738bc201
Remove private clipboard api from public headers
2016-03-26 23:17:53 -04:00
Matthias Clasen
02742d5332
Make debug flags per-display
...
Tihs lets us toggle debug flags in the inspector without affecting
the inspector itself.
2016-03-11 00:22:36 -05:00
Matthias Clasen
f82e4ff362
Trivial formatting fix
2016-03-11 00:22:36 -05:00
Matthias Clasen
33d7196dc8
Add a layout debug option
...
This will be used to show box model borders.
2016-03-10 23:21:22 -05:00
Matthias Clasen
bbd94b5a9f
gtk: Strip newlines from g_warning and g_error
...
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
dd322f715f
Document gtk_parse_args limitations
...
Mention that some things won't work without a display
connection.
2016-01-30 16:11:03 -05:00
Alberto Ruiz
496f0892fc
introspection: This patch fixes nullable return values fixes for the following symbols in gtk
...
gtk_accel_group_query
gtk_accel_group_from_accel_closure
gtk_accel_label_get_accel_widget
gtk_accessible_get_widget
gtk_actionable_get_action_name
gtk_app_chooser_get_app_info
gtk_app_chooser_button_get_heading
gtk_app_chooser_dialog_get_heading
gtk_application_get_window_by_id
gtk_assistant_get_nth_page
gtk_binding_set_find
gtk_builder_get_object
gtk_builder_lookup_callback_symbol
gtk_builder_get_application
gtk_button_get_image
gtk_cell_area_get_focus_from_sibling
gtk_cell_renderer_start_editing
gtk_cell_view_get_model
gtk_cell_view_get_displayed_row
gtk_clipboard_get_owner
gtk_container_get_focus_child
gtk_container_get_focus_vadjustment
gtk_container_get_focus_hadjustment
gtk_dialog_get_widget_for_response
gtk_drag_get_source_widget
gtk_drag_dest_get_target_list
gtk_drag_source_get_target_list
gtk_entry_completion_get_model
gtk_entry_completion_compute_prefix
gtk_expander_get_label_widget
gtk_file_chooser_get_filename
gtk_file_chooser_get_current_folder
gtk_file_chooser_get_uri
gtk_file_chooser_get_current_folder_uri
gtk_file_chooser_get_preview_widget
gtk_file_chooser_get_preview_file
gtk_file_chooser_get_preview_filename
gtk_file_chooser_get_preview_uri
gtk_file_chooser_get_extra_widget
gtk_file_chooser_get_filter
gtk_file_chooser_native_get_accept_label
gtk_file_chooser_native_get_cancel_label
gtk_file_filter_get_name
gtk_font_chooser_get_font_family
gtk_font_chooser_get_font_face
gtk_font_chooser_get_font
gtk_font_chooser_get_font_desc
gtk_font_chooser_get_font_map
gtk_frame_get_label
gtk_gesture_get_device
gtk_gesture_get_window
gtk_gl_area_get_error
gtk_header_bar_get_title
gtk_header_bar_get_subtitle
gtk_header_bar_get_custom_title
gtk_icon_info_get_filename
gtk_icon_view_get_path_at_pos
gtk_icon_view_get_model
gtk_image_get_pixbuf
gtk_image_get_animation
gtk_label_get_mnemonic_widget
gtk_label_get_attributes
gtk_check_version
gtk_menu_button_get_popup
gtk_menu_button_get_menu_model
gtk_menu_button_get_align_widget
gtk_menu_button_get_popover
gtk_menu_item_get_submenu
gtk_menu_item_get_accel_path
gtk_native_dialog_get_title
gtk_native_dialog_get_transient_for
gtk_notebook_get_nth_page
gtk_notebook_get_tab_label_text
gtk_notebook_get_menu_label
gtk_notebook_get_menu_label_text
gtk_notebook_get_group_name
gtk_notebook_get_action_widget
gtk_offscreen_window_get_surface
gtk_offscreen_window_get_pixbuf
gtk_paned_get_child1
gtk_paned_get_child2
gtk_places_sidebar_get_location
gtk_places_sidebar_get_nth_bookmark
gtk_plug_get_socket_window
gtk_popover_get_default_widget
gtk_progress_bar_get_text
gtk_recent_filter_get_name
gtk_recent_manager_lookup_item
gtk_settings_get_default
gtk_socket_get_plug_window
gtk_stack_sidebar_get_stack
gtk_stack_switcher_get_stack
gtk_style_context_get_section
gtk_style_context_get_parent
gtk_style_context_get_frame_clock
gtk_test_find_widget
gtk_text_buffer_get_mark
gtk_text_tag_table_lookup
gtk_text_view_get_tabs
gtk_text_view_toggle_cursor_visible
gtk_text_view_get_window
gtk_toolbar_get_nth_item
gtk_tool_button_get_label
gtk_tool_button_get_icon_name
gtk_tool_button_get_label_widget
gtk_tool_button_get_icon_widget
gtk_tool_palette_get_drop_item
gtk_tool_palette_get_drop_group
gtk_tree_model_filter_convert_child_path_to_path
gtk_tree_model_filter_convert_path_to_child_path
gtk_tree_model_sort_convert_child_path_to_path
gtk_tree_model_sort_convert_path_to_child_path
gtk_tree_view_get_column
gtk_tree_view_get_bin_window
gtk_tree_view_column_get_widget
gtk_tree_view_column_get_tree_view
gtk_widget_get_frame_clock
gtk_window_group_get_current_device_grab
GtkTextBufferSerializeFunc
2016-01-08 12:18:23 +00:00
Timm Bäder
e8aa9b0440
Add a way to highlight resizing widgets
...
https://bugzilla.gnome.org/show_bug.cgi?id=759586
2015-12-18 16:20:19 +01:00
Matthias Clasen
ea91670c11
Don't use g_list_next in gtkmain.c
...
We generally access ->next directly.
2015-10-20 06:14:57 -04:00
Christoph Reiter
263cbd90a0
Fix accessibility not getting initialized in gtk_init() if a default display is already set
...
_gtk_accessibility_init() only gets called if the default
display changes, but in case gdk_init() is called before gtk_init()
the default display is already set and no property notification occurs.
This can happen quite easily in pygobject where
"from gi.repository import Gdk, Gtk"
will call gdk_init() followed by gtk_init() in the Python overrides.
This fixes it by checking for a default display in all cases.
2015-10-07 00:19:32 +02:00
Timm Bäder
5167f525a3
gtkmain: Add nullable annotations
...
https://bugzilla.gnome.org/show_bug.cgi?id=755038
2015-09-23 23:24:09 -04:00
Matthias Clasen
a5e2256770
Fix a startup ordering problem
...
Defer a11y initialization until we have a display. A11y initialization
causes widget classes to be initalized, which in turn needs some
backend-specific information about modifier masks that can't be
obtained before we have a display.
https://bugzilla.gnome.org/show_bug.cgi?id=736125
2015-08-25 15:54:58 -04:00
Carlos Garnacho
6cd45af8b0
gtkmain: Handle rewriting of event fields during grabs for touchpad events
...
The window/coordinates will need translation in the case of touchpad gesture
events, same than with other pointer events.
2015-08-12 23:20:24 +02:00
Carlos Garnacho
a6ca56969e
gtkmain: Don't process WM events if there's a grab on another toplevel
...
This is implicitly done for us in the case of grabs on windows from other
groups, but we must perform this check explicitly for grabs with
owner_events=True on windows from the same group, in that case the window
would handle the events as if there was no grab.
https://bugzilla.gnome.org/show_bug.cgi?id=752327
2015-08-04 17:58:39 +02:00
Matthias Clasen
98121aa302
Add a private function to determine if we simulate
...
These same two or three tests are currently duplicated
in several places, with separate static variables. Lets
do this in one place.
2015-07-31 13:46:34 -04:00