[gtk/wip/matthiasc/popup5: 34/109] x11: Stop using surface->parent
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 34/109] x11: Stop using surface->parent
- Date: Sun, 19 May 2019 22:08:56 +0000 (UTC)
commit 8a18112ecbd900c0318151f089251b12ce89a698
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 23 09:12:10 2019 -0400
x11: Stop using surface->parent
It is always NULL.
gdk/x11/gdksurface-x11.c | 32 ++------------------------------
1 file changed, 2 insertions(+), 30 deletions(-)
---
diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
index 63ce6e9da7..6f23e9ee48 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -858,23 +858,6 @@ _gdk_x11_display_create_surface_impl (GdkDisplay *display,
impl->override_redirect = FALSE;
- /* Sanity checks */
- switch (surface->surface_type)
- {
- case GDK_SURFACE_TOPLEVEL:
- case GDK_SURFACE_TEMP:
- if (surface->parent)
- {
- /* The common code warns for this case */
- xparent = GDK_SCREEN_XROOTWIN (x11_screen);
- }
- break;
-
- default:
- g_assert_not_reached ();
- break;
- }
-
if (!surface->input_only)
{
class = InputOutput;
@@ -932,16 +915,8 @@ _gdk_x11_display_create_surface_impl (GdkDisplay *display,
impl->unscaled_width = surface->width * impl->surface_scale;
impl->unscaled_height = surface->height * impl->surface_scale;
- if (surface->parent)
- {
- abs_x = surface->parent->abs_x;
- abs_y = surface->parent->abs_y;
- }
- else
- {
- abs_x = 0;
- abs_y = 0;
- }
+ abs_x = 0;
+ abs_y = 0;
impl->xid = XCreateWindow (xdisplay, xparent,
(surface->x + abs_x) * impl->surface_scale,
@@ -2390,9 +2365,6 @@ gdk_x11_surface_get_frame_extents (GdkSurface *surface,
rect->width = 1;
rect->height = 1;
- while (surface->parent && (surface->parent)->parent)
- surface = surface->parent;
-
impl = GDK_SURFACE_IMPL_X11 (surface->impl);
/* Refine our fallback answer a bit using local information */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]