summaryrefslogtreecommitdiff
path: root/gdk/wayland
Commit message (Collapse)AuthorAgeFilesLines
* API: gdk: Remove title from gdk_window_new()Benjamin Otte2016-11-051-7/+1
| | | | Use gdk_window_set_title() afterwards instead.
* API: gdk: Remove gdk_window_set_override_redirect()Benjamin Otte2016-11-051-7/+0
| | | | | When you want an override-redirect window, you create it that way. Changing that behavior is not supported anywhere (but on X of course).
* wayland: Remove all mentions of visualsBenjamin Otte2016-11-042-58/+0
|
* gdk: Remove visual APIs from GdkScreenBenjamin Otte2016-11-041-29/+0
| | | | | gdk_screen_list_visuals(), gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() are gone now.
* wayland: check valid pending cairo surfaceOlivier Fourdan2016-11-031-1/+3
| | | | | | | | | | | | | | | gdk_wayland_window_attach_image() is normally called from gdk_window_end_paint() to notify the compositor of newly staged drawing. If any of the drawing code inadvertently dispatches the wayland event loop (for instance with a gdk_flush() call), then it's possible that by the time gdk_window_end_paint() is called, the staged drawing is already destroyed. This commit bypasses the attach_image call in scenarios where the staged drawing is prematurely dropped. https://bugzilla.gnome.org/show_bug.cgi?id=773274
* API: screen: Remove gdk_screen_is_composited()Benjamin Otte2016-10-291-7/+0
| | | | | | | | Switch code to use gdk_display_is_composited() instead. The new code also doesn't use a vfunc to query the property but rather requires the backend to call set_composited()/set_rgba() to change the value.
* API: gdk: Remove visual querying APIsBenjamin Otte2016-10-281-79/+0
| | | | | They are unused, only work on the default display anyway and visuals are on their way out.
* API: gdk: Remove gdk_window_get_visual()Benjamin Otte2016-10-282-17/+2
| | | | With it, remove window->visual.
* gdk: Remove GdkWindow.depth member variableBenjamin Otte2016-10-281-1/+0
| | | | It's unused.
* Remove the last uses of GDK_DISPLAY_OBJECTMatthias Clasen2016-10-251-1/+1
| | | | This is an obsolete macro.
* Drop support for offscreen GdkWindowswip/alexl/no-offscreenAlexander Larsson2016-10-252-20/+6
| | | | | | These complicate a lot of GdkWindow internals to implement features that not a lot of apps use, and will be better achieved using gsk. So, we just drop it all.
* wayland: Allow grabless xdg_popupsCarlos Garnacho2016-10-202-25/+15
| | | | | | | | | | | | | | | xdg_shell v6 allows grabless popups, whose behavior is not that different from override redirect windows with no grab to take keyboard input (and pointer events outside). This means we can relax the requirement to have a grab before creating an xdg_popup. The warning is still useful to have so people stop relying on gdk_window_show();gdk_device_grab() being an ok pattern to popup a window, it's been moved to wayland implementation of gdk_device_grab() instead, so we warn if trying to grab a GDK_WINDOW_TEMP window that's already visible. https://bugzilla.gnome.org/show_bug.cgi?id=771694
* Reduce a warning to a messageMatthias Clasen2016-10-171-2/+5
| | | | | The warning interferes with having a testcase to check this behavior, so reduce this to a message.
* API: Remove gdk_window_set_background()Benjamin Otte2016-10-161-7/+0
| | | | Backgrounds are always transparent black.
* API: Remove ability to set visuals on windowsBenjamin Otte2016-10-162-4/+2
| | | | | | | | And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are gone. We now always use the RGBA visual (if available) and otherwise fall back to the system visual.
* API: Remove gdk_window_set_composited()Benjamin Otte2016-10-162-14/+0
| | | | And the related call gdk_display_supports_composite().
* screen: Remove unused vfuncBenjamin Otte2016-10-161-7/+0
| | | | | GdkScreenClass.broadcast_client_message was unused, but a bunch of backends still had functions (not) implementing it.
* API: screen: Remove gdk_screen_make_display_name()Benjamin Otte2016-10-161-7/+0
| | | | It's identical to gdk_display_get_name().
* API: screen: Remove gdk_screen_get_active_window()Benjamin Otte2016-10-161-14/+0
| | | | | | | | | | | ... and gdk_screen_get_window_stack(). Those functions were originally added in 5afb4f0f116f0e8a200dd55cc6688a957b4d397c but do not seem to be used as they are not implemented anywhere but in X. As GDK is not meant to fulfill window management functionality I'm going to remove these functions without replacements.
* API: gdk: Remove gdk_screen_get_number()Benjamin Otte2016-10-161-7/+0
| | | | It's useless everywhere but in internal X11 code.
* API: Remove gdk_screen_get_width() and gdk_screen_get_height()Benjamin Otte2016-10-161-92/+1
| | | | | | | | | ... and gdk_screen_get_width_mm() and gdk_screen_get_height_mm() and the shortcut counterparts that call these functions on the default screen. Modern display servers don't provide an ability to query the size of a screen or display so we shouldn't allow that either.
* wayland: Use GdkMonitor APIsBenjamin Otte2016-10-161-9/+9
|
* Use eglGetPlatformDisplay{,EXT} if availableAdam Jackson2016-10-101-1/+36
| | | | | | | | | | | | | | | | | Calling eglGetDisplay forces libEGL to guess what kind of pointer you passed it. Different EGL libraries will do different things here, and in particular glvnd will do something different than Mesa. Since we do have an API that allows us to explicitly type the display, use it. The explicit call to eglGetProcAddress is working around a bug in libepoxy 1.3, which does not understand the EGL concept of client extensions. Since it does not, the normal epoxy resolver for eglGetPlatformDisplayEXT would not find any provider for that entry point, and crash when you attempted to call it. Signed-off-by: Adam Jackson <ajax@redhat.com> https://bugzilla.gnome.org/show_bug.cgi?id=772415
* Fix some EGLDisplay * abuseAdam Jackson2016-10-101-1/+1
| | | | | | | | | EGLDisplays are already opaque pointers, and eglGetDisplay returns an EGLDisplay not a pointer to one. Signed-off-by: Adam Jackson <ajax@redhat.com> https://bugzilla.gnome.org/show_bug.cgi?id=772415
* Rename Makefile references from 3.0 to 4.0Matthias Clasen2016-10-071-2/+2
| | | | | This is almost certainly incomplete. Needs careful scrutiny
* wayland: Only 'moved-to-rect' if move_to_rect() was usedJonas Ådahl2016-09-301-0/+3
| | | | | | Don't emit the 'moved-to-rect' signal if move_to_rect() was used. https://bugzilla.gnome.org/show_bug.cgi?id=771516
* wayland: always sync state after a frame is paintedGustavo Noronha Silva2016-09-281-4/+4
| | | | | | | | Opaque region, margin and input region were only being synced when a cairo paint happened. That caused GL paints to sometimes end up with bad state. Move calls to sync state to gdk_window_impl_wayland_end_paint. https://bugzilla.gnome.org/show_bug.cgi?id=771553
* wayland: Avoid negative size constraintsOlivier Fourdan2016-09-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Setting the shadow width earlier as done with commit 4cb1b96 to address bug 771561 proved to cause unexpected side effects on size_allocate signal propagation. As the window is sized correctly earlier, the size_allocate signal is not emitted again in gtk_widget_size_allocate_with_baseline() which prevents clutter-gtk from relocating its child widget correctly. To avoid this issue, revert commit 4cb1b96 but make sure the values passed as min and max size is never negative in Wayland as this is a protocol error. With this, the min/max size will be wrong for a short amount of time, during the state transition, until the shadow width is updated from gdk_window_set_shadow_width(). This approach is much safer and less intrusive than changing the size_allocate logic in gtk. This reverts commit 4cb1b9645e84054c059f174240e8e288c4befe05. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=771915
* wayland: Move and resize popup after it was configuredJonas Ådahl2016-09-141-2/+16
| | | | | | | | | A popup may have moved and resized when configured. Make sure every layer knows about this and call gdk_window_move_resize() with the configured dimension and position. This won't actually move the window, but might resize it. https://bugzilla.gnome.org/show_bug.cgi?id=771117
* wayland: Transform moved_to_rect result properlyJonas Ådahl2016-09-141-11/+22
| | | | | | | | | The result of move_to_rect, received from the xdg_popup.configure event, needs to be translated to the correct coordinate space; that is from real parent window geometry to coordinates relative to the gdk window set as transient-for. https://bugzilla.gnome.org/show_bug.cgi?id=771117
* wayland: Use helper to translate to real parent window geometryJonas Ådahl2016-09-141-6/+18
| | | | | | | | | Use a helper to translate a coordinate from non-real GdkWindow parent to window geometry coordinate space of the real GdkWindow parent, meaning the coordinate space of the GdkWindow of the parent used as a xdg_popup parent where (0, 0) is inside of the shadow margin. https://bugzilla.gnome.org/show_bug.cgi?id=771117
* wayland: Don't pass parent when creating dynamic positionerJonas Ådahl2016-09-141-3/+3
| | | | | | | | When using the dynamic positioner (i.e. positioning from move_to_rect) we can always rely on having a proper transient-for to position relative to, so lets drop the ignored parameter. https://bugzilla.gnome.org/show_bug.cgi?id=771117
* wayland: Don't pass transient-for when getting real parentJonas Ådahl2016-09-141-5/+6
| | | | | | It's always derived from transient-for so no need to pass it. https://bugzilla.gnome.org/show_bug.cgi?id=771117
* wayland: Fix south-west anchor rect calculationJonas Ådahl2016-09-141-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=771117
* wayland: Don't pass non-changing state when calculating popup rectsJonas Ådahl2016-09-141-14/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=771117
* wayland: Move move_to_rect related code closer togetherJonas Ådahl2016-09-141-126/+157
| | | | | | | | | Move the code used for calculating the result of move_to_rect (final_rect, flipped_rect etc) closer to the other move_to_rect functions (i.e. next to create_dynamic_positioner), and let the xdg_popup configure handler just call the calculation function. https://bugzilla.gnome.org/show_bug.cgi?id=771117
* wayland: unmap popup along with its toplevelOlivier Fourdan2016-09-121-0/+26
| | | | | | | | | | | If an application umaps the toplevel from its popup callback, this can lead to a protocol error. Make sure we mark popup parent and use that to check if their parent is the toplevel being unmapped in which case we shall unmap the popup first to avoid the protocol error. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=770906
* gdkdisplay-wayland: Fix some memory leaksTimm Bäder2016-09-081-0/+12
|
* wayland: Warn when an application tries to map popup incorrectlyJonas Ådahl2016-09-022-0/+14
| | | | | | | | | When a popup is mapped but will not be the top most popup (for example the parent is not the current top most popup, or if there already is a popup mapped but the parent is a toplevel), warn and ignore it instead of continuing, as continuing would be a protocol violation. https://bugzilla.gnome.org/show_bug.cgi?id=770745
* Document handle-related Wayland apiMatthias Clasen2016-08-291-7/+67
| | | | | In particular, note that this API depends on an unstable Wayland protocol and thus may have to change.
* wayland: Add API for setting an exported as a parentJonas Ådahl2016-08-294-0/+81
| | | | | | | | Add an API that enables an application to, given an exported window handle, set its own window as a transient of the window associated with the exported window handle. https://bugzilla.gnome.org/show_bug.cgi?id=769788
* wayland: Add API for creating exported window handlesJonas Ådahl2016-08-295-0/+110
| | | | | | | Using the xdg_foreign protocol, expose a way to get handles to windows that may be shared between processes. https://bugzilla.gnome.org/show_bug.cgi?id=769788
* wayland: add min/max size from xdg-shell v6Olivier Fourdan2016-08-251-0/+36
| | | | Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=764413
* wayland: Implement move_to_rectJonas Ådahl2016-08-251-50/+462
| | | | | | | Translate move_to_rect parameter into xdg_positioner requests, and use the generated xdg_positioner to create the popup. https://bugzilla.gnome.org/show_bug.cgi?id=769937
* wayland: Port to xdg_shell unstable v6Jonas Ådahl2016-08-254-124/+240
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=769937
* wayland: Move window geometry calculation to helperJonas Ådahl2016-08-251-7/+21
| | | | | | We'll use it from more places later. https://bugzilla.gnome.org/show_bug.cgi?id=769937
* wayland: Only update the window title if it actually updatedJonas Ådahl2016-08-251-0/+3
| | | | | | This makes the protocol log less spammy. https://bugzilla.gnome.org/show_bug.cgi?id=769937
* wayland: Only sync surface regions once per commitJonas Ådahl2016-08-251-8/+25
| | | | | | | | Only set input, opaque and window geometry regions once per commit. They are double buffered anyway, so the last one would only take effect either way; this way reading protocol logs are much more pleasent. https://bugzilla.gnome.org/show_bug.cgi?id=769937
* wayland: Remove gdk_wayland_display_get_xdg_shell()Jonas Ådahl2016-08-252-20/+0
| | | | | | | Don't expose the xdg_shell struct as it is not yet a stable type that will stay the same. https://bugzilla.gnome.org/show_bug.cgi?id=769937
* wayland: Get tiled state from gtk_shell instead of xdg_shellJonas Ådahl2016-08-252-11/+52
| | | | | | | Use our the 'tiled' entry from our new 'state' enum sent via xdg_surface.configure. https://bugzilla.gnome.org/show_bug.cgi?id=769937