Matthias Clasen
0cfc812a5d
Drop gdk_display_get_device_manager API
...
GdkDeviceManager is being replaced by GdkSeat.
2017-11-25 11:04:14 -05:00
Matthias Clasen
371ea7cbe9
gdk: Remove a leftover GdkScreen
2017-11-25 10:17:19 -05:00
Alexander Larsson
cfb76fedb6
broadway: Roundtrip each update to rate limit redraw
2017-11-23 10:48:29 +01:00
Alexander Larsson
b74959a605
broadway: Add clip node
2017-11-23 10:48:29 +01:00
Alexander Larsson
9e5a22bbe5
broadway: Add opacity node
2017-11-23 10:48:29 +01:00
Alexander Larsson
9b1f6acc2b
broadway: Add shadow node
2017-11-23 10:48:29 +01:00
Alexander Larsson
cbbbf49043
broadway: Add node cache for text
2017-11-23 10:48:29 +01:00
Alexander Larsson
6cc96318c8
broadway: Remove inflate code
...
This is not used anymore
2017-11-23 10:48:29 +01:00
Alexander Larsson
278370c8e5
broadway: Add linear gradient node
2017-11-23 10:48:29 +01:00
Alexander Larsson
f7ff6dbb66
broadway: Add RoundedClip node
2017-11-23 10:48:29 +01:00
Alexander Larsson
0083c084e4
broadway: Add inset shadow
2017-11-23 10:48:29 +01:00
Alexander Larsson
35ceb8e626
broadway: Add outset shadow node
2017-11-23 10:48:29 +01:00
Alexander Larsson
0ad523038c
broadway: Fix border node positioning
2017-11-23 10:48:29 +01:00
Alexander Larsson
cf03229a99
broadway: Add border node
2017-11-23 10:48:29 +01:00
Alexander Larsson
5a8d204c83
broadway: Clean up node parser
2017-11-23 10:48:29 +01:00
Alexander Larsson
0b38ab339e
broadway: Add color nodes
2017-11-23 10:48:29 +01:00
Alexander Larsson
cfdb3952c6
broadway: Fix input events
2017-11-23 10:48:29 +01:00
Alexander Larsson
97c0d112af
broadway: Don't swap node trees until all images are loaded
2017-11-23 10:48:29 +01:00
Alexander Larsson
fd0285de09
broadway: Rewrite textures in nodes to global
2017-11-23 10:48:29 +01:00
Alexander Larsson
54e7a8f0c0
broadway: Remove remaining unused window_update code
2017-11-23 10:48:29 +01:00
Alexander Larsson
f7d8ee041b
broadway: Initial version of using actual render nodes
2017-11-23 10:48:29 +01:00
Alexander Larsson
cc7423855b
broadway: Use textures to configure window contents
...
Instead of using the old buffer code, just use textures to define the
window contents.
2017-11-23 10:46:47 +01:00
Alexander Larsson
a4636a06a7
broadway: Actually upload textures to client
2017-11-23 10:46:47 +01:00
Alexander Larsson
ef79621c44
broadway: Introduce global ids for the textures
2017-11-23 10:46:47 +01:00
Alexander Larsson
48d587d255
broadway: Add support for uploading textures to daemon
2017-11-23 10:46:47 +01:00
Alexander Larsson
f31d7e1f91
broadway: Support fd passing in protocol
...
This will be used to pass buffers
2017-11-23 10:46:47 +01:00
Alexander Larsson
43a02da07b
broadwayd: Read using socket API
...
This changes nothing, but it allows us to later recieve
unix messages and thus fd passing
2017-11-23 10:46:47 +01:00
Alexander Larsson
620d3cf402
broadway: Only support (non-abstract) sockets
...
We want to use fd passing, so drop tcp
2017-11-23 10:46:47 +01:00
Daniel Boles
98c1f16002
doc: Replace uses of #NULL with %NULL
2017-11-22 20:58:28 +00:00
Bastien Nocera
ef031d87be
frame-clock: Fix typo in API documentation
2017-11-22 15:24:19 +01:00
Chun-wei Fan
e076cc7b1f
GDK/Win32: Fix build after GDK Root Window and DND changes
...
Ensure that things build again, and instead use the Windows API to
acquire the screen dimensions (note: this may need to be scaled for
HiDPI, but since I do not own a WinTab-based device, I will need to
keep the dimensions as-is for now).
Also update the gdkdnd-win32.c code to use formats rather than targets.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-11-22 22:18:28 +08:00
Benjamin Otte
c82378ea57
gdk: Add GType support to GdkContentFormats
...
This is not used by anything yet, but add it now, so people looking at
this new code can make sense of it.
Plus, the documentation mentions it, so better have the docs make sense.
It will be used once we add support for conversions to GDK and allow
doing cipboard/dnd by GValue.
2017-11-20 23:22:28 +01:00
Benjamin Otte
1a70ca75e8
gdk: Sanitize GdkContentFormats API
...
Make sure the API reflects the idea that GdkContentFormats is a set
containing mime types. In particular, treat the object itself as a
plural - it's named content format`S' after all - and therefor use
the correct verb form.
Also make GdkContentFormats keep an array instead of a list, now that
it's immutable.
2017-11-20 23:15:11 +01:00
Benjamin Otte
fc2ce5a925
gdk: Make GdkContentFormats immutable
2017-11-20 23:13:10 +01:00
Benjamin Otte
1a482ad276
gdk: Add GdkContentFormatsBuilder
...
Yes, the name is too long.
No, I couldn't think of a shorter one.
2017-11-20 23:12:48 +01:00
Benjamin Otte
d6a209816b
gdkdnd: Make GdkDragContext->formats a GdkContentFormats
...
Instead of it being a GList of GdkAtoms.
2017-11-20 23:12:33 +01:00
Benjamin Otte
9a6ec4e959
contentformats: Rename GtkTargetList
...
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
0638bbb5d5
gdk: Move GtkTargetList to GDK
...
It's gonna be renamed next, so put it in the right source file already.
For now retain the old name to keep the diff small.
2017-11-20 23:12:33 +01:00
Matthias Clasen
315db6d505
wayland: Intern signal names
2017-11-17 23:22:02 -05:00
Matthias Clasen
4dc4db56dc
wayland: Intern settings keys
2017-11-17 22:47:49 -05:00
Matthias Clasen
3b06ae5072
gdk: Intern signal names
...
We were forgetting this in a few places.
2017-11-17 22:47:26 -05:00
Matthias Clasen
a129053ed9
gdk: Use G_PARAM_SPEC_STATIC_STRINGS throughout
...
This avoids some string copies at startup.
2017-11-17 21:38:08 -05:00
Matthias Clasen
c2f6208ce5
Add private api for setting cursor theme
...
This is implemented in multiple gdk backends,
and we can avoid and ugly ifdef cascade in gtk
by adding a vfunc for this.
2017-11-17 17:42:12 -05:00
Matthias Clasen
2d591cde78
Include gdk-private.h
...
This gives us access to private gdk api.
2017-11-17 16:34:04 -05:00
Matthias Clasen
1ec93bdda6
gdk: Move code around
...
Move the gdk_display functions to gdkdisplay.c.
They are misplaced in gdkevents.c.
2017-11-17 16:22:21 -05:00
Matthias Clasen
dbb18ad5d8
gdk: Add a private method to get a server timestamp
...
This is needed in the clipboard code. We don't make
it public, since that code is destined to eventually
live in gdk anyway.
2017-11-17 15:39:08 -05:00
Matthias Clasen
6263286c4a
Drop gdkscreen.h
...
Nothing uses GdkScreen anymore, so we can get rid of it.
2017-11-17 13:54:04 -05:00
Matthias Clasen
0b8c88f7d6
quartz: Remove remaining uses of GdkScreen
2017-11-17 13:47:15 -05:00
Matthias Clasen
a62e75964c
quartz: Make GdkQuartzScreen a plain object
...
No need to derive this from GdkScreen anymore.
2017-11-17 13:47:15 -05:00
Matthias Clasen
77f921f5de
quartz: Drop an unused include
...
No GdkScreen apis are used in here.
2017-11-17 13:47:15 -05:00
Matthias Clasen
c7b5cb8e8e
quartz: Avoid a screen argument
...
The screen is never used in _gdk_quartz_screen_get_setting,
so drop it.
2017-11-17 13:47:15 -05:00
Matthias Clasen
0f2d7d41f1
win32: Remove remaining uses of GdkScreen
2017-11-17 13:47:15 -05:00
Matthias Clasen
d24ae9c032
win32: Make GdkWin32Screen a plain object
...
No need to derive this from GdkScreen anymore.
2017-11-17 13:47:14 -05:00
Matthias Clasen
211d72e545
win32: Avoid a screen argument
...
The screen is never used in _gdk_win32_screen_get_setting,
so drop it.
2017-11-17 13:21:24 -05:00
Matthias Clasen
e8353eab26
win32: Remove an unused include
...
No GdkScreen apis are used in here.
2017-11-17 13:20:53 -05:00
Matthias Clasen
34fa61e13c
Fix the build
2017-11-17 13:12:51 -05:00
Matthias Clasen
71c463ae85
x11: Drop GdkX11Visual as public api
...
There was no useful functionality left here,
so just remove this from the api altogether.
2017-11-17 13:03:11 -05:00
Matthias Clasen
8ced2c6478
x11: Stop using GdkScreen altogether
...
Derive GdkX11Screen directly from GObject, and
remove the last remaining uses of GdkScreen.
2017-11-17 10:51:55 -05:00
Matthias Clasen
2daa7d1a53
x11: Stop using GdkScreen in api
...
This type is going away, so switch to using GdkX11Screen
everywhere.
2017-11-17 10:51:55 -05:00
Matthias Clasen
abb1d59d4e
Stop calling _gdk_screen_close
...
It does nothing useful, and is going away.
2017-11-17 10:51:55 -05:00
Matthias Clasen
a5e1276924
Stop including gdkscreen.h
...
It is not used anymore.
2017-11-17 10:51:55 -05:00
Philip Withnall
bd89ff4c9e
broadway: Add missing dependency to build
...
The generated file clienthtml.h is #included by broadway-server.c, which
is one of the sources of the broadway library — so clienthtml.h needs to
be one of the sources of that library too.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=790489
2017-11-17 10:14:42 +00:00
Alexander Larsson
810ba4edcf
broadway: Fix toplevel handling
...
The toplevels list contains GdkWindowImplBroadways, and we shouldn't
free it.
2017-11-17 10:37:01 +01:00
Benjamin Otte
f4ec6290f8
gdk: Remove gdk_flush()
...
If you need to flush a display, use gdk_display_flush().
There is never a need to flush displays you don't know about.
2017-11-17 08:36:35 +01:00
Matthias Clasen
9629f9acc9
Add a comment
...
Document that gdk-private.h is meant for private gdk<>gtk apis.
2017-11-17 00:37:10 -05:00
Matthias Clasen
fc0f7dc217
Remove gdkprivate.h
...
This is one-too-many private headers. Move the few
declarations here to gdkinternals.h.
2017-11-17 00:34:04 -05:00
Matthias Clasen
38c8310969
Drop gdkmain.h
2017-11-17 00:16:09 -05:00
Matthias Clasen
3f0d42f74b
Stop including gdkmain.h
...
It is empty now.
2017-11-17 00:16:09 -05:00
Matthias Clasen
26d5b04124
Drop an empty file
...
Nothing deprecated left!
2017-11-17 00:08:24 -05:00
Matthias Clasen
6e94be3f50
Drop the error trap vfuncs
...
No longer used.
2017-11-17 00:08:24 -05:00
Matthias Clasen
30e6a4c29d
Drop the generic error trap api
...
This is only implemented on X11, so we don't
need generic api for it.
2017-11-17 00:08:24 -05:00
Matthias Clasen
90d502fdbd
x11: Fix error traps in the dnd code
...
The code for grabbing keys was using a generic
error trap call, and more concerning, it was forgetting
to pop the trap.
2017-11-16 23:56:11 -05:00
Matthias Clasen
5517ab0651
Drop an unused variable
...
These are no longer used.
2017-11-16 23:27:14 -05:00
Matthias Clasen
92f49ed3e3
Drop a duplicate definition
...
GDK_PRIORITY_EVENTS is already defined in gdkevents.h
2017-11-16 23:23:42 -05:00
Matthias Clasen
6bf215bc15
Drop gdk_set_program_class
...
Together with the corresponding getter.
This is x11-specific functionality.
2017-11-16 23:22:08 -05:00
Matthias Clasen
d73898437f
x11: Add gdk_x11_display_set_program_class
...
The program class is a very X-specific concept.
There should be x11-backend api to deal with it.
2017-11-16 23:21:06 -05:00
Matthias Clasen
49f3d86c84
wayland: Stop using gdk_get_program_class
...
This is an abuse, at best. If we need to pass the
app id down here, lets pass the app id.
2017-11-16 23:18:03 -05:00
Matthias Clasen
95876cbc9c
Remove gdk/gdkx.h
...
It was just a kludge.
2017-11-16 23:00:01 -05:00
Matthias Clasen
39386275a4
Move some code around
...
Move gdk_disable_multidevice to gdkdisplaymanager.[hc].
2017-11-16 22:54:26 -05:00
Matthias Clasen
211f16d68b
Drop gdk_notify_startup_complete
...
This function and its variant are just wrappers
around the display-specific function.
2017-11-16 22:45:52 -05:00
Matthias Clasen
419a9af28c
gdk: Move some headers around
...
Move gdk_flush and gdk_set_allowed_backends to where they
belong.
2017-11-16 22:18:45 -05:00
Matthias Clasen
baf40d35c5
Drop gdk_beep
...
This is an unnecessary wrapper around gdk_display_beep.
2017-11-16 22:10:26 -05:00
Matthias Clasen
ce13dbba10
Drop gdk_set_double_click_time
...
This is an unnecessary and not-recommended-to-be-used
wrapper around gdk_display_set_double_click_time.
2017-11-16 22:04:25 -05:00
Benjamin Otte
e9629a5149
wayland: Fix initial cursor
...
Make sure the initial cursor isn't random which would happen due to an
early exit when cursor == pointer->cursor triggered because both were
NULL.
2017-11-15 19:07:17 +01:00
Benjamin Otte
4c4e914806
gdk: Replace GDK_NONE with NULL
2017-11-15 19:07:17 +01:00
Benjamin Otte
cb941956d3
gdk: Turn GdkAtom into a const char *
...
Instead of an integer, it is now a char pointer. We also use
g_intern_string() instead of doing the interning ourselves.
2017-11-15 19:07:17 +01:00
Benjamin Otte
0451c6d30c
gdk: Make GDK_NONE Atom translate to NULL
...
Instead of the string "NONE" we now use NULL.
2017-11-15 19:07:17 +01:00
Benjamin Otte
a385a50260
gdk: Get rid of magic special atoms
2017-11-15 19:07:17 +01:00
Benjamin Otte
41f9a174e2
x11: Remove special casing for GdkAtoms
...
This is in preparation for the GdkAtom removal
2017-11-15 19:07:17 +01:00
Benjamin Otte
fb94f79094
selection: Remove #ifdef WAYLAND
...
Instead, turn the functions into backend API:
gdk_broadway_display_add_selection_targets()
gdk_broadway_display_clear_selection_targets()
Remove the old per-backend functions, too.
2017-11-15 19:07:16 +01:00
Matthias Clasen
0436cc44fc
win32: Remove all checks for GDK_WINDOW_ROOT
...
We are no longer creating windows of this type, so no
need to check for it.
2017-11-14 18:16:19 -05:00
Matthias Clasen
e2682e62a8
win32: Remove all uses of get_root_window
...
This is following similar changes done in the x11 and
broadway backends, but it has not been built.
Some fixups may be needed.
2017-11-14 18:16:19 -05:00
Benjamin Otte
ed1b6a9bed
gdkwindow: Remove event_mask arguments from constructors
2017-11-13 23:41:38 +01:00
Benjamin Otte
ef5a6835b2
window: Set ALL_EVENT_MASK
...
This is a trivial commit that does a big change: We now ignore event masks.
Further commits will clean up code, but if bisection ends up here, you
know it's because code is getting delivered events that it weren't getting
before.
2017-11-13 23:41:37 +01:00
Benjamin Otte
de40ced21c
gdk: Fix GDK_ALL_EVENTS_MASK
...
This mask was forgotten to update when the last 2 event masks were
added, probably because it looks like it's already maxed.
2017-11-13 23:41:37 +01:00
Matthias Clasen
5f73afae3d
x11: Remove mentions of GDK_WINDOW_ROOT
...
This backend never creates a window of this type, so no
need to check for it anymore.
2017-11-13 16:47:50 -05:00
Matthias Clasen
964cdaf3a3
x11: Stop creating a root window
...
We no longer need it.
2017-11-13 16:39:54 -05:00
Matthias Clasen
5999b1c73a
x11: Store toplevel list in GdkDisplay
...
This will let us get rid of the root window.
2017-11-13 16:32:34 -05:00
Matthias Clasen
8af666cb4f
x11: Remove another use of the root window
...
We just need the X root window here.
2017-11-13 16:09:47 -05:00
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
Chun-wei Fan
c06b1cc103
Win32: Re-work cursor handling
...
Like the X11 and Wayland backends, re-work how the cursors are being
handled. So, we use a hash table to cache up the HCURSORS that we
create along the way.
We still need to cache up the icon/cursor themes since this is something
that is not part of Windows but was added on to support icon/cursor themes
such as Adwaita on Windows, but should be in-line with what is going on in
GdkCursor.
Also, remove the _gdk_grab_cursor global variable in gdkprivate-win32.h,
and replace it with another variable in the GdkWin32Display structure,
to make things cleaner in the process.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-11-09 08:30:09 +08:00
Matthias Clasen
73a3d4b785
wayland: Drop an unused function
...
We no longer create a root window, so need to have
a function for it.
2017-11-07 07:43:09 -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
efd86912f0
broadway: Drop the root window
...
We already have a list of toplevels, so we don't
need the root window for this.
2017-11-06 21:51:30 -05:00
Matthias Clasen
6261f5f7b8
wayland: Drop the root window
...
We can just keep a list of toplevels in the display.
2017-11-06 18:52:37 -05: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
c1c919cf7d
win32: Stop using gdk_display_get_root_window
...
Use the newly introduced backend api for this purpose.
2017-11-05 21:45:51 -05:00
Matthias Clasen
be75984485
win32: Make gdk_win32_display_get_root_window available
...
This will be used to replace the equivalent frontend api,
which is going away.
2017-11-05 21:45:51 -05:00
Matthias Clasen
2eb78a2374
wayland: Stop using gdk_display_get_root_window
...
We can just use the display field directly.
2017-11-05 19:44:39 -05:00
Matthias Clasen
f3150c3a43
Typo fix
2017-11-05 19:43:39 -05:00
Matthias Clasen
a163d5b7a7
broadway: Stop using gdk_display_get_root_window
...
We can just use the field in the display.
2017-11-05 19:37:54 -05:00
Matthias Clasen
c08a6a062f
Stop using the root window in gdk_window_create_similar_image_surface
...
Just create a plain image surface if we don't get a window.
This should work just fine and lets us drop another implicit
use of the root window.
2017-11-05 19:30:54 -05:00
Matthias Clasen
de83fc48bf
Stop defaulting to the root window in gdk_window_get_geometry
...
This function is not documented as accepting NULL for the
window, and we don't want to have the root window sneakily
appear in the api like this.
2017-11-05 19:29:49 -05:00
Matthias Clasen
50cf11d398
Make toplevels have parent == NULL
...
This is a move towards removing root windows as a frontend
gdk concept.
2017-11-05 19:28:37 -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
c16a0bd9b7
Drop gdk_display_get_toplevel_windows
...
Nothing uses this private api anymore, so we can drop it.
2017-11-05 18:39:01 -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
Matthias Clasen
e980f68f5b
quartz: Drop another use of gdk_display_get_toplevel_windows
...
This one was forgotten in the previous commit.
2017-11-05 18:30:03 -05:00
Matthias Clasen
4f701c71f1
quartz: Drop use of gdk_display_get_toplevel_windows
...
We can use the newly added helper function for this.
2017-11-05 18:28:27 -05:00
Matthias Clasen
c44e693b26
quartz: Add a function to get all toplevels
...
This will let us avoid frontend API for this.
2017-11-05 18:27:49 -05:00
Matthias Clasen
84a3772ef6
broadway: Stop using gdk_display_get_toplevel_windows
...
We already keep a list of all toplevels in the broadway
display struct. Just use it.
2017-11-05 18:19:04 -05:00
Matthias Clasen
807cac2c79
quartz: Drop mentions of foreign windows
...
The quartz backend never creates foreign windows,
so no need to check for window type.
2017-11-05 12:09:06 -05:00
Matthias Clasen
909330f347
wayland: Fix animated cursors
...
We must reset the image delay when stopping the timeout,
otherwise the code setting it up thinks it is still running.
This fixes cursor animation only working for the very first
enter of a widget with an animated cursor, as seen in the
cursors example in gtk4-demo.
2017-11-05 11:27:06 -05:00
Matthias Clasen
65a7557fc1
Fix some typos
...
Correct function names in the docs, etc.
2017-11-04 23:51:25 -04:00
Benjamin Otte
e484af8e96
wayland: Fix embarassing bug
...
Yes, I did not get to test this code path until now. Because nobody uses
icon surfaces, boo!
2017-11-05 00:07:18 +01: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
Benjamin Otte
4c2bae3a1a
texture: Add gdk_texture_new_from_file()
...
and gdk_texture_new_from_resource().
While doing set, turn all GDK_AVAILABLE_IN_3_90 into
GDK_AVAILABLE_IN_3_94 because that's now true after the renaming.
2017-11-04 15:22:25 +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
Chun-wei Fan
3228149892
gdk/win32: Fix Win32 GL Context switching
...
Since on Windows we need to use a good amount of temporary GL contexts,
we need to switch back to the original GL contexts we were using when
we are done with the temporary GL contexts, otherwise multi-GL windows
will cause confusions causing display artifacts and crashes.
Also, use the GdkWin32GLContext::gl_hdc consistently throughout
the code and remove the GdkWin32Display::gl_hdc as Lukas K pointed out
that GdkWin32Display::gl_hdc becomes out-of-date and so the HDC that the
GL context is bound to becomes incorrect in sceanarios using multiple
windows with GtkGLArea/GdkGLArea items (which would cause the artifacts in
programs that use multiple windows with GtkGLArea/GdkGLArea items, and it
turns out that GdkWin32Display::gl_hdc is actually not necessary to help
keep track of the HDCs we use for our GL contexts.
This will also fix on Windows with GDK_GL=always, or when GSK's gl
renderer is used.
Partly based on patch from Lukas K <lu@0x83.eu>
https://bugzilla.gnome.org/show_bug.cgi?id=789213
2017-11-04 10:39:03 +08:00
Chun-wei Fan
6a12a3cd10
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
2017-11-04 10:32:21 +08: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
9323d098a6
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.
2017-11-04 00:07:13 +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
ec824b9e50
wayland: Redo cursor handling
...
This is in line with the X11 changes last patch.
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
d30d55be9e
gdk: Make cursors instantiable
...
This way, backends can instantiate GdkCursor objects directly.
Do that for broadway to test that it indeed works.
2017-11-04 00:07:13 +01:00
Benjamin Otte
428547e14f
gdk: Add gdk_cursor_hash() and gdk_cursor_equal()
...
This is so GDK backends can put cursors into hash tables and avoid
duplicates.
2017-11-04 00:07:13 +01:00
Benjamin Otte
6b2ea46a5f
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.
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
0cad0caf7d
broadway: Don't crash on startup
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
ca3c23662c
GskTexture => GdkTexture
...
We want this thing to replace GdkPixbuf, so it has to live in GDK.
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
4a2dc53a76
Drop foreign window checks in Broadway
...
The broadway backen never creates foreign windows,
so no need to check for this type of window.
2017-11-01 22:55:34 -04:00
Matthias Clasen
6ba48bd0d8
Drop foreign window checks in Wayland
...
The wayland backend never creates foreign windows,
so no need to check for this type of window.
2017-11-01 22:55:27 -04: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
33195d473c
Remove an unused function
2017-11-01 22:49:52 -04:00
Matthias Clasen
3a5b478e0f
wayland: Some cursor cleanups
...
Remove methods that are not used.
2017-11-01 22:35:19 -04:00
Matthias Clasen
c958818631
Some forgotten cleanups
2017-11-01 21:53:50 -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
dcf2553f23
win32: Stop using gdk_screen_get_display
...
We can just use the field directly.
2017-11-01 20:54:50 -04:00
Matthias Clasen
b44ef37a21
quartz: Stop using gdk_screen_get_display
...
We can just use the field directly.
2017-11-01 20:54:22 -04:00
Matthias Clasen
93053adbf6
mir: Stop using gdk_screen_get_display
...
Just use the field directly.
2017-11-01 20:48:03 -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
a16a25151c
Drop GdkScreen from public api
...
It is still used by some of the backends, so keep the
files around.
2017-11-01 19:44:29 -04:00
Matthias Clasen
0f9e9a9ec2
wayland: No more screen
...
This gets rid of the GdkWaylandScreen object and all
remnants of GdkScreen in the wayland backend.
2017-11-01 19:44:29 -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
8144d31ebe
Stop talking about GdkScreen in the docs
...
This api is going away.
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
adfbc82202
Fix a compiler warning.
2017-11-01 19:44:28 -04:00
Matthias Clasen
feb870add3
Drop gdk_screen_get_default
...
This function is not used anymore.
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
03ae29b7c5
quartz: 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
Matthias Clasen
473c642131
win32: Remove an unused function
...
This also removed the last use of gdk_display_get_default_screen
from the win32 backend.
2017-11-01 19:44:28 -04:00
Matthias Clasen
44a173824e
quartz: Stop using gdk_display_get_default_screen
...
The GdkScreen api is going away. The quartz screen is
a singleton anyway.
2017-11-01 19:44:28 -04:00
Matthias Clasen
1605d378e5
Don't use GdkScreen here
...
The GdkScreen api is going away, so avoid using it, both
in code and in documentation.
2017-11-01 19:44:28 -04:00
Matthias Clasen
08bd079938
Remove leftover code
...
Nothing is setting this object data anymore, so no point
in cleaning it up.
2017-11-01 19:44:28 -04:00
Matthias Clasen
bee74e8243
broadway: No more screen
...
This gets rid of the GdkBroadwayScreen object and all
remnants of GdkScreen in the broadway backend.
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
Benjamin Otte
9b0d9aa7a6
wayland: Remove unused variable
2017-11-01 20:09:06 +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
Matthias Clasen
f2655b055d
monitor: Add a ::valid property
...
This is slightly more useful than the existing
::invalidate signal, since it can be queried at
any time.
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
5f4e0d33f1
gdk: Remove nonexisting function from internal header
2017-11-01 18:17:55 +01:00
Andrew Crerar
edffa8d6ed
Resolving undefined reference to gdk_get_default_root_window
...
https://bugzilla.gnome.org/show_bug.cgi?id=789777
2017-11-01 17:04:32 +00:00
Benjamin Otte
047cf67cb2
broadway: Fix fallout from screen changes
2017-11-01 16:03:16 +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
29ffecb39c
Drop gdkvisual.h from the installed headers.
2017-10-31 22:07:34 -04:00
Matthias Clasen
61a3a90f89
Don't mention GdkVisual in the docs
...
It is going away.
2017-10-31 22:05:58 -04:00
Matthias Clasen
883c0d1708
Remove a no-longer existing function
2017-10-31 21:59:47 -04:00
Matthias Clasen
e424dcb049
wayland: Stop using ::monitors-changed
...
Instead of connecting to this signal for every single window,
walk the window tree from the root window.
2017-10-31 21:48:58 -04:00
Matthias Clasen
67cea50383
Drop gdk_get_default_root_window
...
This is a trivial convenience function, and it is barely used.
2017-10-31 21:30:59 -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
68a61e9ac6
Drop gdk_screen_get_toplevel_windows
2017-10-31 20:49:50 -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
0839aae3c8
monitor: remove GdkScreen mention from docs
...
No need to refer to GdkScreen here.
2017-10-31 19:15:01 -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
b36b7f08fb
Drop gdk_pango_context_get_for_display
...
This api does not offer much over the pango api, and
the use of the resolution here is causing layering
problems.
2017-10-31 18:15:50 -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
Daniel Boles
33d29f6671
gdkmonitor: Fix typo
2017-10-31 18:41:55 +00: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
Matthias Clasen
f8cad19829
dnd: Drop GdkScreen from apis
...
Drop the screen argument from gdk_dnd_find_window_for_screen
and rename the function to gdk_dnd_find_window. The screen
argument does not add anything here since the drag context
is already tied to the display. Update all backends, and
update all callers.
2017-10-31 10:18:10 -04:00
Chun-wei Fan
b0dc8514e4
gdk/win32: Fix build after GdkScreen and settings changes
...
Implement GdkDisplay->get_setting() using the existing
_gdk_win32_screen_get_setting() and get rid of GdkScreen->get_setting()
as a result, to follow the changes in GDK.
Also, since we don't emit settings events in the Windows GDK backend,
but we acquire settings to print using GDK_SETTING, drop all references
related to GDK_SETTING since that is now removed. Update the debug
strings that are print out as a result
(gdk_screen_get_setting->gdk_display_get_setting).
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-10-31 14:50:24 +08:00
Matthias Clasen
43b0fcb727
Forgotten file
2017-10-30 23:06:17 -04:00
Matthias Clasen
ba91af62ad
Drop gdk_app_launch_context_set_screen
...
This function is not necessary, since we already know the display.
2017-10-30 23:01:34 -04:00
Matthias Clasen
f0189aecbc
Drop gdk_event_set/get_screen
...
These functions have been replaced by display variants.
2017-10-30 22:22:00 -04:00
Matthias Clasen
525e2a7944
gdk: Stop using gdk_event_set_screen
...
Use gdk_event_set_display instead.
2017-10-30 22:22:00 -04:00
Matthias Clasen
c74ee7a159
Add gdk_event_get/set_display
...
The GdkScreen apis are going away, this is a replacement.
2017-10-30 22:22:00 -04:00
Matthias Clasen
5c2e254f65
Drop gdk_pango_context_get
...
This is a trivial convenience api, and it is not used in gtk.
2017-10-30 21:36:37 -04:00
Matthias Clasen
1f114b1257
Drop gdk_pango_context_get_for_screen
...
GdkScreen is going away, and this api is unused in gtk.
2017-10-30 21:29:48 -04:00
Matthias Clasen
154117218c
Drop gdk_screen_get_setting
...
It has been replaced by gdk_display_get_setting.
2017-10-30 17:03:09 -04:00
Matthias Clasen
d9809df8ce
wayland: Stop using gdk_screen_get_setting
...
Use gdk_display_get_setting instead.
2017-10-30 17:01:46 -04:00
Matthias Clasen
51ba0b41a2
x11: Stop using gdk_screen_get_setting
...
Use gdk_display_get_setting instead.
2017-10-30 17:01:18 -04:00
Matthias Clasen
378c7648ba
Drop the GdkScreen get_setting vfunc
...
It is unused.
2017-10-30 16:53:17 -04:00
Matthias Clasen
42d2b50515
x11: Don't set the GdkScreen get_setting vfunc
...
We are not using it anymore.
2017-10-30 16:52:56 -04:00
Matthias Clasen
2a4da2cfcd
wayland: Don't set the GdkScreen get_setting vfunc
...
We are not using it anymore.
2017-10-30 16:52:39 -04:00
Matthias Clasen
2a3e7e93d3
broadway: Don't set the GdkScreen get_setting vfunc
...
We are not using it anymore.
2017-10-30 16:52:21 -04:00
Matthias Clasen
dea277520f
quartz: Don't set the GdkScreen get_setting vfunc
...
We are not using it anymore.
2017-10-30 16:51:59 -04:00
Matthias Clasen
96f1e83877
mir: Don't set the GdkScreen get_setting vfunc
...
We don't use it anymore.
2017-10-30 16:51:38 -04:00
Matthias Clasen
6dbb1e20a6
Stop using the GdkScreen get_setting vfunc
...
We can now call the GdkDisplay implementation instead.
2017-10-30 16:45:36 -04:00
Matthias Clasen
f9dacd6de0
use the GdkDisplay get_setting vfunc
...
Instead of calling the GdkScreen implementation, use our
own vfunc now.
2017-10-30 16:44:47 -04:00
Matthias Clasen
19157c5bf4
x11: Implement the GdkDisplay get_setting vfunc
...
Just call the GdkScreen vfunc.
2017-10-30 16:44:18 -04:00
Matthias Clasen
4ffe9ca70c
wayland: Implement the GdkDisplay get_setting vfunc
...
Just call the GdkScreen vfunc.
2017-10-30 16:43:50 -04:00
Matthias Clasen
729aeef6ab
broadway: Implement the GdkDisplay get_setting vfunc
...
This is just a trivial implementation.
2017-10-30 16:43:13 -04:00
Matthias Clasen
c63c672ba8
quartz: Implement the GdkDisplay get_setting vfunc
...
Just call the GdkScreen vfunc.
2017-10-30 16:42:49 -04:00
Matthias Clasen
a9ea420b65
mir: Implement the GdkDisplay get_setting vfunc
...
Just call the corresponding screen vfunc.
2017-10-30 16:41:59 -04:00
Matthias Clasen
f2055bfb7b
gdk: Add a get_setting vfunc to GdkDisplay
...
This will eventually replace the GdkScreen vfunc of the
same name.
2017-10-30 16:39:49 -04:00
Matthias Clasen
209f24f962
Remove gdk_setting_get
...
This is a minor convenience api, and it is unused.
2017-10-30 15:31:02 -04:00
Matthias Clasen
e99687194a
Forgotten files
...
Clean up the setting event from headers and docs too.
2017-10-30 10:08:32 -04:00
Matthias Clasen
10ba84a6a9
gdk: Drop settings events
...
We are not emitting these events anymore, so lets remove them
from the api. The GdkSettingAction enum is moved to xsettings-client.c
where its only use remains.
2017-10-30 09:49:02 -04:00
Matthias Clasen
7e8e4dcf76
x11: Stop emitting settings events
...
Not needed anymore.
2017-10-30 09:49:02 -04:00
Matthias Clasen
5d4c979425
wayland: Stop emitting setting events
...
Not needed anymore.
2017-10-30 09:49:02 -04:00
Matthias Clasen
627c0ae549
quartz: Stop emitting setting events
...
Not needed anymore.
2017-10-30 09:49:02 -04:00
Matthias Clasen
d3e45cf087
mir: Stop emitting setting events
...
Not needed anymore.
2017-10-30 09:49:02 -04:00
Matthias Clasen
8686526b4a
x11: Emit GdkDisplay::setting-changed
...
We still generate the event too.
That will be removed in a future commit.
2017-10-30 09:29:09 -04:00
Matthias Clasen
3c0614994f
wayland: Emit GdkDisplay::setting-changed
...
We still generate the event too.
That will be removed in a future commit.
2017-10-30 09:28:29 -04:00
Matthias Clasen
36a94b49c7
quartz: Emit GdkDisplay::setting-changed
...
We still generate the event too.
That will be removed in a future commit.
2017-10-30 09:27:59 -04:00
Matthias Clasen
bb6c8a475f
mir: Emit GdkDisplay::setting-changed
...
We still generate the event too.
That will be removed in a future commit.
2017-10-30 09:23:16 -04:00