Chun-wei Fan [Fri, 3 Nov 2017 08:37:18 +0000 (16:37 +0800)]
gdk/win32: Fix build after GdkScreen and cursor cleanups
Move the leftovers from the removals to use the current APIs, to fix the
build. Also for gdk_device_virtual_set_window_cursor(), only do
something when a valid GdkCursor is passed in here.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
Benjamin Otte [Sat, 4 Nov 2017 00:37:03 +0000 (01:37 +0100)]
gtk: Use gtk_widget_set_cursor()
... and gtk_widget_set_cursor_from_name() instead of setting cursors on
GdkWindows.
Benjamin Otte [Sat, 4 Nov 2017 00:35:59 +0000 (01:35 +0100)]
x11: Don't use g_hash_table_steal()
It returns TRUE/FALSE, not the item you've stolen, so if you free that,
your X connections is gonna have a BadCursor.
Benjamin Otte [Fri, 3 Nov 2017 23:58:57 +0000 (00:58 +0100)]
widget: Export gtk_widget_set_cursor()
Widgets can now set their favorite cursor using public API.
This is very necessary because all cursor-setting APIs are still
setting it on their GdkWindow, which by now is the toplevel - oops.
Benjamin Otte [Fri, 3 Nov 2017 22:19:22 +0000 (23:19 +0100)]
gdk: Cursors no longer have a display
Change constructors to reflect that.
While doing so, also add a fallback argument to the cursor constructors,
so it is now possible to create cursors with fallback.
Benjamin Otte [Fri, 3 Nov 2017 22:18:56 +0000 (23:18 +0100)]
testsuite: Remove cursor tests
Cursors always exist now, it does not make sense to test that their
creation fails anymore.
Benjamin Otte [Fri, 3 Nov 2017 21:49:04 +0000 (22:49 +0100)]
gdk: Cursors are created generically
There are no longer subclasses for cursors now.
Benjamin Otte [Fri, 3 Nov 2017 21:41:31 +0000 (22:41 +0100)]
wayland: Redo cursor handling
This is in line with the X11 changes last patch.
Benjamin Otte [Fri, 3 Nov 2017 05:01:56 +0000 (06:01 +0100)]
x11: Redo cursor handling completely
Instead of creating a GdkX11Cursor, create GdkCursors. Cache the XCursor
in a hash table instead.
Also, make use of the new fallback mechanism for fallback code: Make
sure to provide cursors for the names that are guaranteed to exist, but
do not do bad attempts at displaying texture surfaces.
Black/White/transparent is not a replacement for those.
Benjamin Otte [Fri, 3 Nov 2017 05:00:56 +0000 (06:00 +0100)]
gdk: Make cursors instantiable
This way, backends can instantiate GdkCursor objects directly.
Do that for broadway to test that it indeed works.
Benjamin Otte [Fri, 3 Nov 2017 02:08:04 +0000 (03:08 +0100)]
gdk: Add gdk_cursor_hash() and gdk_cursor_equal()
This is so GDK backends can put cursors into hash tables and avoid
duplicates.
Benjamin Otte [Fri, 3 Nov 2017 02:07:33 +0000 (03:07 +0100)]
gdk: Add gdk_cursor_get_fallback()
There's no way to use it yet, but I want it to be available for
refactoring the backends.
Benjamin Otte [Fri, 3 Nov 2017 00:59:15 +0000 (01:59 +0100)]
cursor: Turn new_from_surface() into new_from_texture()
Also turn all the arguments into read-only properties on the GdkCursor
object.
Benjamin Otte [Fri, 3 Nov 2017 00:55:01 +0000 (01:55 +0100)]
broadway: Don't crash on startup
Benjamin Otte [Thu, 2 Nov 2017 22:00:38 +0000 (23:00 +0100)]
gdk: Remove ability to download a cursor
Benjamin Otte [Thu, 2 Nov 2017 20:39:00 +0000 (21:39 +0100)]
GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
Benjamin Otte [Thu, 2 Nov 2017 19:38:07 +0000 (20:38 +0100)]
gdk: Add gdk_cursor_get_name()
Also add the GdkCursor::name property.
Benjamin Otte [Thu, 2 Nov 2017 17:52:35 +0000 (18:52 +0100)]
gdk: Get rid of GdkCursorType
Now that we no longer have API that uses cursor types, don't keep them
around.
Carlos Garnacho [Fri, 3 Nov 2017 21:13:39 +0000 (22:13 +0100)]
gtkwindow: Use event target widget for WM handling special paths
The check used to achieve discarding events not meant for the window
widget itself (because they are handled in the regular paths). Using
the target widget is the equivalent now.
Kjell Ahlstedt [Fri, 3 Nov 2017 19:05:28 +0000 (20:05 +0100)]
GtkWindow: Tidy up after icon became a cairo surface
Use g_value_set/get_boxed() in gtk_window_get/set_property(), case PROP_ICON.
icon_from_list() shall always add a reference to the returned icon.
gtk_window_set_icon() must accept icon != NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=789870
Timm Bäder [Fri, 3 Nov 2017 10:22:00 +0000 (11:22 +0100)]
notebook: Fix setting show-tabs
show-tabs=FALS means the notebook is not supposed to show tabs,
regardless of whether it has a current page or not.
Timm Bäder [Fri, 3 Nov 2017 10:21:36 +0000 (11:21 +0100)]
notebook: Remove useless call to gtk_widget_reset_style
Khaled Hosny [Fri, 3 Nov 2017 09:58:56 +0000 (11:58 +0200)]
Update Arabic translation
Timm Bäder [Fri, 3 Nov 2017 09:44:16 +0000 (10:44 +0100)]
glarea: Use content size of the widget
For buffer sizes, etc. We only draw in the content area after all.
Timm Bäder [Fri, 3 Nov 2017 09:41:37 +0000 (10:41 +0100)]
rendernodeview: Use content size instead of allocated size
Timm Bäder [Fri, 3 Nov 2017 09:40:43 +0000 (10:40 +0100)]
colorplane: Use content size everywhere
Timm Bäder [Fri, 3 Nov 2017 09:37:16 +0000 (10:37 +0100)]
revealer: Create clip node for right widget size
It should use gtk_widget_get_width/height here to get the correct
content size of the revealer.
Benjamin Otte [Thu, 2 Nov 2017 11:47:50 +0000 (12:47 +0100)]
x11: Remove gdk_x11_grab_server()
Luckily, this one is unused.
Benjamin Otte [Thu, 2 Nov 2017 01:02:37 +0000 (02:02 +0100)]
gdk: Remove GdkWindow.set_device_cursor() vfunc
That one calls through to GdkDevice.set_window_cursor(), so let's just
use that one.
Benjamin Otte [Wed, 1 Nov 2017 21:57:42 +0000 (22:57 +0100)]
x11: Remove outdated functions from API
We don't want generic APIs that do random stuff on the default X display.
Benjamin Otte [Wed, 1 Nov 2017 21:56:46 +0000 (22:56 +0100)]
x11: Add API to query root window and screen from GdkDisplay
Timm Bäder [Thu, 2 Nov 2017 10:21:29 +0000 (11:21 +0100)]
widget: Add get_width() and get_height()
Timm Bäder [Wed, 1 Nov 2017 11:47:11 +0000 (12:47 +0100)]
testwidgetfocus: Make focused button more obvious
Timm Bäder [Wed, 1 Nov 2017 10:23:36 +0000 (11:23 +0100)]
widget: Remove stray prototype
gtk_cairo_transform_to_window is gone.
Emmanuele Bassi [Thu, 2 Nov 2017 06:42:49 +0000 (06:42 +0000)]
x11: Use backend-specific API to get GdkScreen
The gdk_display_get_default_screen() function was removed, but the X11
GdkEventSource still lobs around GdkX11Screen instances.
Matthias Clasen [Wed, 23 Aug 2017 11:49:04 +0000 (07:49 -0400)]
Drop foreign window checks in Broadway
The broadway backen never creates foreign windows,
so no need to check for this type of window.
Matthias Clasen [Tue, 22 Aug 2017 19:23:46 +0000 (15:23 -0400)]
Drop foreign window checks in Wayland
The wayland backend never creates foreign windows,
so no need to check for this type of window.
Matthias Clasen [Tue, 22 Aug 2017 19:08:14 +0000 (15:08 -0400)]
Stop using foreign windows for xsettings
Stop wrapping the xsettings manager window in a foreign
window. This means that we cannot use the gdk window filter
APIs anymore, so just do the filtering in a non-generic
way.
Matthias Clasen [Thu, 2 Nov 2017 02:53:24 +0000 (22:53 -0400)]
Stop providing the owner in GdkEventOwnerChange
This information is rarely useful, and it is one
of the last places where we create foreign windows.
Matthias Clasen [Thu, 2 Nov 2017 02:49:52 +0000 (22:49 -0400)]
Remove an unused function
Matthias Clasen [Thu, 2 Nov 2017 02:35:19 +0000 (22:35 -0400)]
wayland: Some cursor cleanups
Remove methods that are not used.
Matthias Clasen [Thu, 2 Nov 2017 01:50:33 +0000 (21:50 -0400)]
Some forgotten cleanups
Matthias Clasen [Thu, 2 Nov 2017 01:47:35 +0000 (21:47 -0400)]
t Remove gdk_cursor_new_for_display
The preferred api to create cursors is by name, and the
GdkCursorType enumeration can directly trace its ancestry
to the horrible X cursor font. So lets stop using it.
Matthias Clasen [Thu, 2 Nov 2017 01:22:21 +0000 (21:22 -0400)]
tests: Stop using gdk_cursor_new_for_display
The name-based api is the one we prefer.
Matthias Clasen [Thu, 2 Nov 2017 01:19:31 +0000 (21:19 -0400)]
label: Stop using gdk_cursor_new_for_display
We prefer to use the name-based api for cursors nowadays.
Matthias Clasen [Thu, 2 Nov 2017 00:59:54 +0000 (20:59 -0400)]
Drop GdkScreen from the docs
It is no longer part of the api.
Matthias Clasen [Thu, 2 Nov 2017 00:55:09 +0000 (20:55 -0400)]
Drop gdk_screen_get_display
This is not longer used.
Matthias Clasen [Thu, 2 Nov 2017 00:54:50 +0000 (20:54 -0400)]
win32: Stop using gdk_screen_get_display
We can just use the field directly.
Matthias Clasen [Thu, 2 Nov 2017 00:54:22 +0000 (20:54 -0400)]
quartz: Stop using gdk_screen_get_display
We can just use the field directly.
Matthias Clasen [Wed, 1 Nov 2017 23:42:52 +0000 (19:42 -0400)]
mir: Stop using gdk_screen_get_display
Just use the field directly.
Matthias Clasen [Wed, 1 Nov 2017 23:41:45 +0000 (19:41 -0400)]
x11: Stop using gdk_screen_get_display
Never necessary, we can just use the field directly.
Matthias Clasen [Wed, 1 Nov 2017 23:28:57 +0000 (19:28 -0400)]
Drop GdkScreen from public api
It is still used by some of the backends, so keep the
files around.
Matthias Clasen [Wed, 1 Nov 2017 23:25:45 +0000 (19:25 -0400)]
wayland: No more screen
This gets rid of the GdkWaylandScreen object and all
remnants of GdkScreen in the wayland backend.
Matthias Clasen [Wed, 1 Nov 2017 22:40:51 +0000 (18:40 -0400)]
Use x11-specific api to get at the screen
gdk_display_get_default_screen is going away.
Matthias Clasen [Wed, 1 Nov 2017 22:39:05 +0000 (18:39 -0400)]
x11: Add backend api to get the screen
gdk_display_get_default_screen is gone, but we still
have x11-specific screen apis that GTK+ is using, so
we need an alterative way to get the screen object.
Matthias Clasen [Wed, 1 Nov 2017 22:19:34 +0000 (18:19 -0400)]
Stop talking about GdkScreen in the docs
This api is going away.
Matthias Clasen [Wed, 1 Nov 2017 22:17:35 +0000 (18:17 -0400)]
Drop gdk_display_get_default_screen
Also remove the backend implementations.
This api is no longer used.
Matthias Clasen [Wed, 1 Nov 2017 22:16:46 +0000 (18:16 -0400)]
Fix a compiler warning.
Matthias Clasen [Wed, 1 Nov 2017 22:16:05 +0000 (18:16 -0400)]
Drop gdk_screen_get_default
This function is not used anymore.
Matthias Clasen [Wed, 1 Nov 2017 22:14:48 +0000 (18:14 -0400)]
x11: Stop using gdk_screen_get_default
This api is going away.
Matthias Clasen [Wed, 1 Nov 2017 22:14:27 +0000 (18:14 -0400)]
quartz: Stop using gdk_screen_get_default
This api is going away.
Matthias Clasen [Wed, 1 Nov 2017 22:06:24 +0000 (18:06 -0400)]
x11: Stop using gdk_display_get_default_screen
There's no point in using this api here, we can directly
get the screen member from the GdkX11Display struct.
Matthias Clasen [Wed, 1 Nov 2017 21:32:32 +0000 (17:32 -0400)]
win32: Remove an unused function
This also removed the last use of gdk_display_get_default_screen
from the win32 backend.
Matthias Clasen [Wed, 1 Nov 2017 21:30:00 +0000 (17:30 -0400)]
quartz: Stop using gdk_display_get_default_screen
The GdkScreen api is going away. The quartz screen is
a singleton anyway.
Matthias Clasen [Wed, 1 Nov 2017 21:08:04 +0000 (17:08 -0400)]
Don't use GdkScreen here
The GdkScreen api is going away, so avoid using it, both
in code and in documentation.
Matthias Clasen [Wed, 1 Nov 2017 21:04:33 +0000 (17:04 -0400)]
Remove leftover code
Nothing is setting this object data anymore, so no point
in cleaning it up.
Matthias Clasen [Wed, 1 Nov 2017 18:46:26 +0000 (14:46 -0400)]
broadway: No more screen
This gets rid of the GdkBroadwayScreen object and all
remnants of GdkScreen in the broadway backend.
Matthias Clasen [Wed, 1 Nov 2017 23:40:56 +0000 (19:40 -0400)]
Fix a typo
A display is not of type GDK_TYPE_SCREEN.
Benjamin Otte [Wed, 1 Nov 2017 20:59:45 +0000 (21:59 +0100)]
gdk: Remove VisibilityNotify events
Benjamin Otte [Wed, 1 Nov 2017 20:43:56 +0000 (21:43 +0100)]
widget: Don't tell people to wait for nonexisting events
Daniel Boles [Tue, 31 Oct 2017 19:43:52 +0000 (19:43 +0000)]
Adwaita: Fix Entry:has-frame if backdrop/disabled
by explicitly including these in the selector removing the border, to
avoid other rules on these pseudoclasses overriding the .flat class.
https://bugzilla.gnome.org/show_bug.cgi?id=789733
Daniel Boles [Tue, 31 Oct 2017 19:57:45 +0000 (19:57 +0000)]
HighContrast: Fix GtkEntry:has-frame not working
• Remove the box-shadow at the top when the entry is in the foreground
• Bump precedence so that :disabled entries do not have .flat overridden
• Also add :backdrop to stop HCInverse getting a lighter BG in :backdrop
https://bugzilla.gnome.org/show_bug.cgi?id=789733
Daniel Boles [Thu, 12 Oct 2017 20:09:58 +0000 (21:09 +0100)]
Inspector: better default split of CSS nodes/props
Move the default pos of the Paned handle to 400px from the left, i.e.
50% of the default width of the window. The previous position at 300px
from left meant the node treeview was too narrow & could easily result
in the (useful) State column not being visible in the case of many
apps. The properties pane doesn't need to be as big as it was anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=788898
Benjamin Otte [Wed, 1 Nov 2017 19:55:41 +0000 (20:55 +0100)]
entry: Remove unused variable
Benjamin Otte [Wed, 1 Nov 2017 19:52:57 +0000 (20:52 +0100)]
switch: Use gtk_widget_contains()
Benjamin Otte [Wed, 1 Nov 2017 19:51:14 +0000 (20:51 +0100)]
x11: Remove screen-specific macros
Benjamin Otte [Wed, 1 Nov 2017 19:50:33 +0000 (20:50 +0100)]
button: Use gtk_widget_contains()
Benjamin Otte [Wed, 1 Nov 2017 19:09:06 +0000 (20:09 +0100)]
wayland: Remove unused variable
Benjamin Otte [Wed, 1 Nov 2017 18:36:09 +0000 (19:36 +0100)]
widget: Add gtk_widget_contains()
Matthias Clasen [Wed, 1 Nov 2017 15:52:56 +0000 (11:52 -0400)]
Change the fullscreen-on-monitor api
Use GdkMonitor here, since that is our primary monitor
object now, and GdkScreen is going away.
Matthias Clasen [Wed, 1 Nov 2017 18:02:08 +0000 (14:02 -0400)]
monitor: Add a ::valid property
This is slightly more useful than the existing
::invalidate signal, since it can be queried at
any time.
Benjamin Otte [Wed, 1 Nov 2017 17:26:34 +0000 (18:26 +0100)]
gdk: Remove gdk_get_display_arg_name()
Since we're no longer allowing arguments, this is always NULL now.
Benjamin Otte [Wed, 1 Nov 2017 17:18:24 +0000 (18:18 +0100)]
testsuite: Remove unused test using long-gone API
Benjamin Otte [Wed, 1 Nov 2017 17:17:55 +0000 (18:17 +0100)]
gdk: Remove nonexisting function from internal header
Benjamin Otte [Wed, 1 Nov 2017 17:16:11 +0000 (18:16 +0100)]
window: Unset transient parent in set_display()
If somebody changes a window's display, the transient parent cannot
stay if it's on a different display.
Andrew Crerar [Wed, 1 Nov 2017 16:22:03 +0000 (12:22 -0400)]
Resolving undefined reference to gdk_get_default_root_window
https://bugzilla.gnome.org/show_bug.cgi?id=789777
Benjamin Otte [Wed, 1 Nov 2017 15:00:12 +0000 (16:00 +0100)]
broadway: Fix fallout from screen changes
Benjamin Otte [Wed, 1 Nov 2017 14:46:20 +0000 (15:46 +0100)]
window: Clear the renderer un unrealize
We disconnect from the GDK window, so the renderer can't keep any useful
state.
Plus, we might be using an entirely different window next time we
realize (after a call to gtk_window_set_display() for example) that should
use a completely different renderer anyway.
Benjamin Otte [Wed, 1 Nov 2017 14:33:02 +0000 (15:33 +0100)]
gskgl: Deal with being rerealized
Benjamin Otte [Wed, 1 Nov 2017 14:31:36 +0000 (15:31 +0100)]
x11: Make gdk_x11_display_open() public API
People should be able to explicitily open displays to their backends.
Matthias Clasen [Wed, 1 Nov 2017 02:44:15 +0000 (22:44 -0400)]
Drop GdkVisual
This type was unused except for serving as a parent
for GdkX11Visual. Just move the fields to that type.
Matthias Clasen [Wed, 1 Nov 2017 02:26:39 +0000 (22:26 -0400)]
Drop the monitors-changed signal
We are not using it anymore.
Matthias Clasen [Wed, 1 Nov 2017 02:06:43 +0000 (22:06 -0400)]
Drop gdkvisual.h from the installed headers.
Matthias Clasen [Wed, 1 Nov 2017 02:05:58 +0000 (22:05 -0400)]
Don't mention GdkVisual in the docs
It is going away.
Matthias Clasen [Wed, 1 Nov 2017 01:59:47 +0000 (21:59 -0400)]
Remove a no-longer existing function
Matthias Clasen [Wed, 1 Nov 2017 01:48:58 +0000 (21:48 -0400)]
wayland: Stop using ::monitors-changed
Instead of connecting to this signal for every single window,
walk the window tree from the root window.
Matthias Clasen [Wed, 1 Nov 2017 01:30:59 +0000 (21:30 -0400)]
Drop gdk_get_default_root_window
This is a trivial convenience function, and it is barely used.
Matthias Clasen [Wed, 1 Nov 2017 01:28:28 +0000 (21:28 -0400)]
Drop gdk_screen_get_root_window
This function is no longer used.
Matthias Clasen [Wed, 1 Nov 2017 01:22:57 +0000 (21:22 -0400)]
Port to gdk_display_get_root_window
This is the replacement for the GdkScreen api of the same name.
Matthias Clasen [Wed, 1 Nov 2017 00:49:50 +0000 (20:49 -0400)]
Drop gdk_screen_get_toplevel_windows