From 6c0e889a85d942ddffb590ddb897c716eadedba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armin=20Krezovi=C4=87?= Date: Sat, 26 Aug 2017 21:44:55 +0200 Subject: [PATCH] Get rid of MetaScreen --- po/POTFILES.in | 1 - src/Makefile.am | 4 - src/core/screen-private.h | 65 --------------- src/core/screen.c | 170 -------------------------------------- src/meta/screen.h | 41 --------- src/meta/types.h | 1 - 6 files changed, 282 deletions(-) delete mode 100644 src/core/screen-private.h delete mode 100644 src/core/screen.c delete mode 100644 src/meta/screen.h diff --git a/po/POTFILES.in b/po/POTFILES.in index e3a53cfc9..6e05468c1 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -19,7 +19,6 @@ src/core/main.c src/core/meta-close-dialog-default.c src/core/mutter.c src/core/prefs.c -src/core/screen.c src/core/util.c src/core/window.c src/ui/frames.c diff --git a/src/Makefile.am b/src/Makefile.am index 08c0db342..0a0d5a08b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -261,9 +261,6 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \ core/place.h \ core/prefs.c \ meta/prefs.h \ - core/screen.c \ - core/screen-private.h \ - meta/screen.h \ core/startup-notification.c \ core/startup-notification-private.h \ meta/types.h \ @@ -475,7 +472,6 @@ libmutterinclude_headers = \ meta/meta-window-shape.h \ meta/meta-x11-display.h \ meta/prefs.h \ - meta/screen.h \ meta/theme.h \ meta/types.h \ meta/util.h \ diff --git a/src/core/screen-private.h b/src/core/screen-private.h deleted file mode 100644 index fd7d57219..000000000 --- a/src/core/screen-private.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ - -/** - * \file screen-private.h Screens which Mutter manages - * - * Managing X screens. - * This file contains methods on this class which are available to - * routines in core but not outside it. (See screen.h for the routines - * which the rest of the world is allowed to use.) - */ - -/* - * Copyright (C) 2001 Havoc Pennington - * Copyright (C) 2003 Rob Adams - * Copyright (C) 2004-2006 Elijah Newren - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -#ifndef META_SCREEN_PRIVATE_H -#define META_SCREEN_PRIVATE_H - -#include "display-private.h" -#include -#include -#include "stack-tracker.h" -#include "ui.h" -#include "meta-monitor-manager-private.h" - -#define META_WIREFRAME_XOR_LINE_WIDTH 2 - -struct _MetaScreen -{ - GObject parent_instance; - - MetaDisplay *display; - - int closing; -}; - -struct _MetaScreenClass -{ - GObjectClass parent_class; -}; - -MetaScreen* meta_screen_new (MetaDisplay *display, - guint32 timestamp); -void meta_screen_free (MetaScreen *screen, - guint32 timestamp); - -void meta_screen_manage_all_windows (MetaScreen *screen); - - -#endif diff --git a/src/core/screen.c b/src/core/screen.c deleted file mode 100644 index 423e537d0..000000000 --- a/src/core/screen.c +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ - -/* - * Copyright (C) 2001, 2002 Havoc Pennington - * Copyright (C) 2002, 2003 Red Hat Inc. - * Some ICCCM manager selection code derived from fvwm2, - * Copyright (C) 2001 Dominik Vogt, Matthias Clasen, and fvwm2 team - * Copyright (C) 2003 Rob Adams - * Copyright (C) 2004-2006 Elijah Newren - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -/** - * SECTION:screen - * @title: MetaScreen - * @short_description: Mutter X screen handler - */ - -#include -#include "screen-private.h" -#include -#include "util-private.h" -#include -#include "window-private.h" -#include "frame.h" -#include -#include "workspace-private.h" -#include "keybindings-private.h" -#include "stack.h" -#include -#include -#include "core.h" -#include "meta-cursor-tracker-private.h" -#include "boxes-private.h" -#include "backends/meta-backend-private.h" -#include "backends/meta-logical-monitor.h" - -#include -#include - -#include -#include -#include -#include -#include - -#include "x11/meta-x11-display-private.h" -#include "x11/window-x11.h" -#include "x11/xprops.h" - -#include "backends/x11/meta-backend-x11.h" - -G_DEFINE_TYPE (MetaScreen, meta_screen, G_TYPE_OBJECT); - -static void -meta_screen_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ -#if 0 - MetaScreen *screen = META_SCREEN (object); -#endif - - switch (prop_id) - { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -meta_screen_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ -#if 0 - MetaScreen *screen = META_SCREEN (object); -#endif - - switch (prop_id) - { - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -meta_screen_finalize (GObject *object) -{ - /* Actual freeing done in meta_screen_free() for now */ -} - -static void -meta_screen_class_init (MetaScreenClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->get_property = meta_screen_get_property; - object_class->set_property = meta_screen_set_property; - object_class->finalize = meta_screen_finalize; -} - -static void -meta_screen_init (MetaScreen *screen) -{ -} - -MetaScreen* -meta_screen_new (MetaDisplay *display, - guint32 timestamp) -{ - MetaScreen *screen; - int number; - Window xroot = meta_x11_display_get_xroot (display->x11_display); - - number = meta_ui_get_screen_number (); - - meta_verbose ("Trying screen %d on display '%s'\n", - number, display->x11_display->name); - - screen = g_object_new (META_TYPE_SCREEN, NULL); - screen->closing = 0; - - screen->display = display; - - meta_verbose ("Added screen %d ('%s') root 0x%lx\n", - number, display->x11_display->screen_name, - xroot); - - return screen; -} - -void -meta_screen_free (MetaScreen *screen, - guint32 timestamp) -{ - screen->closing += 1; - - g_object_unref (screen); -} - -/** - * meta_screen_get_display: - * @screen: A #MetaScreen - * - * Retrieve the display associated with screen. - * - * Returns: (transfer none): Display - */ -MetaDisplay * -meta_screen_get_display (MetaScreen *screen) -{ - return screen->display; -} diff --git a/src/meta/screen.h b/src/meta/screen.h deleted file mode 100644 index ec9162efd..000000000 --- a/src/meta/screen.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ - -/* - * Copyright (C) 2008 Iain Holmes - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -#ifndef META_SCREEN_H -#define META_SCREEN_H - -#include -#include -#include -#include - -#define META_TYPE_SCREEN (meta_screen_get_type ()) -#define META_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SCREEN, MetaScreen)) -#define META_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_SCREEN, MetaScreenClass)) -#define META_IS_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_SCREEN)) -#define META_IS_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_SCREEN)) -#define META_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_SCREEN, MetaScreenClass)) - -typedef struct _MetaScreenClass MetaScreenClass; - -GType meta_screen_get_type (void); - -MetaDisplay *meta_screen_get_display (MetaScreen *screen); - -#endif diff --git a/src/meta/types.h b/src/meta/types.h index 116bc9fed..2f286f90b 100644 --- a/src/meta/types.h +++ b/src/meta/types.h @@ -29,7 +29,6 @@ typedef struct _MetaCompositor MetaCompositor; typedef struct _MetaDisplay MetaDisplay; typedef struct _MetaX11Display MetaX11Display; typedef struct _MetaFrame MetaFrame; -typedef struct _MetaScreen MetaScreen; typedef struct _MetaWindow MetaWindow; typedef struct _MetaWorkspace MetaWorkspace; /**