Matthias Clasen
7839e0d7d5
x11: Fix a crash
...
This was crashing the moment a second window is opened.
2017-11-11 12:07:11 -05:00
Matthias Clasen
bdb442be21
x11: Reduce uses of the root window
...
Avoid calling the get_root_window api that returns
a GdkWindow in some places, and instead use the X
root window directly.
2017-11-09 22:52:37 -05:00
Benjamin Otte
2177b191ba
x11: Correctly set icons
...
X11 obviously doesn't use 4 bytes for a 4 bytes pixel. Rather, it uses
unsigned long, which happens to be 8 bytes these days.
2017-11-07 12:24:43 +01:00
Matthias Clasen
20fab69c38
Drop gdk_display_get_root_window
...
This is no longer used.
2017-11-05 21:45:51 -05:00
Matthias Clasen
063db3630b
x11: Stop using gdk_display_get_root_window
...
Use the backend api for this.
2017-11-05 21:45:51 -05:00
Matthias Clasen
5db2352eba
x11: Make gdk_x11_display_get_root_window available
...
This will replace the frontend api of the same name.
2017-11-05 21:45:51 -05:00
Matthias Clasen
119c433882
x11: Handle parent being NULL when creating windows
...
We want to make toplevels have a NULL parent, this
gets us ready for it.
2017-11-05 19:25:22 -05:00
Matthias Clasen
28a8d03c0b
x11: Drop use of gdk_display_get_toplevel_windows
...
Use the newly introduced helper for this task.
2017-11-05 18:36:49 -05:00
Matthias Clasen
76b6d86659
x11: Add a helper to get all toplevels
...
This will let us avoid frontend API for this task.
2017-11-05 18:33:56 -05:00
Benjamin Otte
7e137b2524
gdk: Use G_N_ELEMENTS() when iterating over constant arrays
...
And do that everywhere.
Because if we don't, we're gonna crash sometimes.
2017-11-05 00:07:18 +01:00
Benjamin Otte
d092e8dd78
gdk: Fix fallback names for the help cursor
2017-11-05 00:07:18 +01:00
Benjamin Otte
70846c85b3
window: Make icons GdkTextures
...
Cairo surfaces are bad, mkay?
2017-11-05 00:07:17 +01:00
Rico Tzschichholz
7b0ed47525
x11: Make gdk_x11_display_get_xcursor be recognized as instance method
2017-11-04 13:23:02 +01:00
Benjamin Otte
d78bbb7e96
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.
2017-11-04 01:35:59 +01:00
Benjamin Otte
4e7a056777
gdk: Cursors are created generically
...
There are no longer subclasses for cursors now.
2017-11-04 00:07:13 +01:00
Benjamin Otte
e294f71555
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.
2017-11-04 00:07:13 +01:00
Benjamin Otte
5adf21a17d
cursor: Turn new_from_surface() into new_from_texture()
...
Also turn all the arguments into read-only properties on the GdkCursor
object.
2017-11-04 00:07:13 +01:00
Benjamin Otte
81c2bebaca
gdk: Remove ability to download a cursor
2017-11-04 00:07:13 +01:00
Benjamin Otte
8ba9ae6012
gdk: Add gdk_cursor_get_name()
...
Also add the GdkCursor::name property.
2017-11-04 00:07:13 +01:00
Benjamin Otte
a1759a0a52
gdk: Get rid of GdkCursorType
...
Now that we no longer have API that uses cursor types, don't keep them
around.
2017-11-04 00:07:13 +01:00
Benjamin Otte
8aa68110bd
x11: Remove gdk_x11_grab_server()
...
Luckily, this one is unused.
2017-11-02 12:47:50 +01:00
Benjamin Otte
9c98adcd15
gdk: Remove GdkWindow.set_device_cursor() vfunc
...
That one calls through to GdkDevice.set_window_cursor(), so let's just
use that one.
2017-11-02 12:42:58 +01:00
Benjamin Otte
d380cf114b
x11: Remove outdated functions from API
...
We don't want generic APIs that do random stuff on the default X display.
2017-11-02 12:42:58 +01:00
Benjamin Otte
f33c20920b
x11: Add API to query root window and screen from GdkDisplay
2017-11-02 12:42:16 +01:00
Emmanuele Bassi
d2e9a5fa88
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.
2017-11-02 06:42:49 +00:00
Matthias Clasen
9f6b556dc2
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.
2017-11-01 22:55:17 -04:00
Matthias Clasen
5bd8884bf8
Stop providing the owner in GdkEventOwnerChange
...
This information is rarely useful, and it is one
of the last places where we create foreign windows.
2017-11-01 22:53:24 -04:00
Matthias Clasen
2a60928157
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.
2017-11-01 21:49:05 -04:00
Matthias Clasen
3b7763eebc
Drop gdk_screen_get_display
...
This is not longer used.
2017-11-01 20:57:46 -04:00
Matthias Clasen
fee93d8d7b
x11: Stop using gdk_screen_get_display
...
Never necessary, we can just use the field directly.
2017-11-01 20:48:03 -04:00
Matthias Clasen
047eac5a96
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.
2017-11-01 19:44:28 -04:00
Matthias Clasen
7f0b5297c6
Drop gdk_display_get_default_screen
...
Also remove the backend implementations.
This api is no longer used.
2017-11-01 19:44:28 -04:00
Matthias Clasen
a5ba92830e
x11: Stop using gdk_screen_get_default
...
This api is going away.
2017-11-01 19:44:28 -04:00
Matthias Clasen
e3daf986ca
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.
2017-11-01 19:44:28 -04:00
Benjamin Otte
bd6b6ed93c
gdk: Remove VisibilityNotify events
2017-11-01 22:00:34 +01:00
Benjamin Otte
bcced800ea
x11: Remove screen-specific macros
2017-11-01 20:51:14 +01:00
Matthias Clasen
606345cbaa
Change the fullscreen-on-monitor api
...
Use GdkMonitor here, since that is our primary monitor
object now, and GdkScreen is going away.
2017-11-01 14:17:20 -04:00
Benjamin Otte
2d31a5499a
gdk: Remove gdk_get_display_arg_name()
...
Since we're no longer allowing arguments, this is always NULL now.
2017-11-01 18:26:34 +01:00
Benjamin Otte
161f891d55
x11: Make gdk_x11_display_open() public API
...
People should be able to explicitily open displays to their backends.
2017-11-01 15:48:00 +01:00
Matthias Clasen
0411cc5620
Drop GdkVisual
...
This type was unused except for serving as a parent
for GdkX11Visual. Just move the fields to that type.
2017-10-31 22:44:15 -04:00
Matthias Clasen
727aa6cb08
Drop the monitors-changed signal
...
We are not using it anymore.
2017-10-31 22:42:33 -04:00
Matthias Clasen
524fcbecfd
Drop gdk_screen_get_root_window
...
This function is no longer used.
2017-10-31 21:28:28 -04:00
Matthias Clasen
463fba18a6
Port to gdk_display_get_root_window
...
This is the replacement for the GdkScreen api of the same name.
2017-10-31 21:27:24 -04:00
Matthias Clasen
8f129ddd13
Use gdk_display_get_toplevel_windows
...
This replaces the GdkScreen api of the same name.
2017-10-31 20:47:57 -04:00
Matthias Clasen
5cb5bdf1bc
Add gdk_display_get_toplevel_windows
...
This is replacing the corresponding GdkScreen api, which
is going away. To implement this, we need to add a
get_root_window vfunc to GdkDisplay.
2017-10-31 20:29:48 -04:00
Matthias Clasen
01dfb49bbe
Drop the screen resolution api
...
GTK+ now uses the gtk-xft-dpi setting directly.
Note: this commit only fixes the backends that
currently provide this setting. The win32 and
Quartz backends still need to be fixed.
2017-10-31 19:13:21 -04:00
Matthias Clasen
31b7555b7b
Stop using screen resolution
...
This api is going away.
2017-10-31 18:53:29 -04:00
Matthias Clasen
a27bfaa0a3
Drop the GDK_DPI_SCALE variable
...
It complicates the dpi handling, and was really just a workaround
for non-dpi aware applications when hidpi support was first introduced.
2017-10-31 18:37:54 -04:00
Matthias Clasen
2d6bd1ae6d
Drop gdk_window_get_screen
...
This includes removing the GdkScreen argument from the
create_window_impl display vfunc.
2017-10-31 17:25:01 -04:00
Matthias Clasen
a3cffa5072
Drop GdkScreen from GdkDevice apis
...
Returning the screen does not add anything here and
GdkScreen is going away.
2017-10-31 12:30:38 -04:00