[gtk+/gdk-backend-wayland] wayland: Trim some unused struct fields
- From: Kristian Høgsberg <krh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend-wayland] wayland: Trim some unused struct fields
- Date: Sat, 12 Feb 2011 13:40:09 +0000 (UTC)
commit 6eac07d4f6622fc88efe4d60cd024ebb7fc55c47
Author: Kristian Høgsberg <krh bitplanet net>
Date: Fri Feb 11 09:50:10 2011 -0500
wayland: Trim some unused struct fields
gdk/wayland/gdkdisplay-wayland.c | 30 ------------------------------
gdk/wayland/gdkdisplay-wayland.h | 12 ------------
gdk/wayland/gdkkeys-wayland.c | 6 ++----
gdk/wayland/gdkscreen-wayland.c | 31 +------------------------------
gdk/wayland/gdkwindow-wayland.c | 1 -
5 files changed, 3 insertions(+), 77 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index a116ed1..884b1e5 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -38,34 +38,8 @@
#include "gdkkeysprivate.h"
#include "gdkprivate-wayland.h"
-typedef struct _GdkEventTypeWayland GdkEventTypeWayland;
-
-struct _GdkEventTypeWayland
-{
- gint base;
- gint n_events;
-};
-
G_DEFINE_TYPE (GdkDisplayWayland, _gdk_display_wayland, GDK_TYPE_DISPLAY)
-/* GDK_VISIBILITY,
- * GDK_MAP,
- * GDK_UNMAP,
- * GDK_PROPERTY_NOTIFY
- * GDK_SELECTION_CLEAR
- * GDK_SELECTION_ REQUEST
- * GDK_SELECTION_NOTIFY
- * GDK_CLIENT_EVENT,
- *
- * new keyboard mapping: _gdk_keymap_keys_changed (display);
- *
- * Selection owner change: GDK_OWNER_CHANGE;
- *
- * Screen size changes: _gdk_wayland_screen_size_changed (screen, xevent);
- *
- * XkbStateNotify: _gdk_keymap_state_changed (display, xevent);
- */
-
static void
gdk_input_init (GdkDisplay *display)
{
@@ -337,10 +311,6 @@ gdk_wayland_display_finalize (GObject *object)
g_list_foreach (display_wayland->input_devices, (GFunc) g_object_unref, NULL);
g_list_free (display_wayland->input_devices);
- /* input GdkWindow list */
- g_list_foreach (display_wayland->input_windows, (GFunc) g_free, NULL);
- g_list_free (display_wayland->input_windows);
-
/* Free all GdkScreens */
for (i = 0; i < 1; i++)
g_object_unref (display_wayland->screens[i]);
diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h
index ebe67d6..d575d40 100644
--- a/gdk/wayland/gdkdisplay-wayland.h
+++ b/gdk/wayland/gdkdisplay-wayland.h
@@ -58,30 +58,18 @@ struct _GdkDisplayWayland
GdkScreen *default_screen;
GdkScreen **screens;
- gint grab_count;
-
/* Keyboard related information */
GdkKeymap *keymap;
- guint keymap_serial;
-
- /* drag and drop information */
- GdkDragContext *current_dest_drag;
/* input GdkDevice list */
GList *input_devices;
- /* input GdkWindow list */
- GList *input_windows;
-
/* Startup notification */
gchar *startup_notification_id;
/* Time of most recent user interaction. */
gulong user_time;
- /* The offscreen window that has the pointer in it (if any) */
- GdkWindow *active_offscreen_window;
-
/* Wayland fields below */
struct wl_display *wl_display;
struct wl_egl_display *native_display;
diff --git a/gdk/wayland/gdkkeys-wayland.c b/gdk/wayland/gdkkeys-wayland.c
index 139e548..1513fe7 100644
--- a/gdk/wayland/gdkkeys-wayland.c
+++ b/gdk/wayland/gdkkeys-wayland.c
@@ -539,12 +539,10 @@ gdk_wayland_keymap_map_virtual_modifiers (GdkKeymap *keymap,
GDK_SUPER_MASK, GDK_HYPER_MASK, GDK_META_MASK
};
int i, j;
- gboolean retval;
GdkWaylandKeymap *wayland_keymap;
- struct xkb_desc *xkb;
+ gboolean retval;
wayland_keymap = GDK_WAYLAND_KEYMAP (keymap);
- xkb = wayland_keymap->xkb;
for (j = 0; j < 3; j++)
{
@@ -563,7 +561,7 @@ gdk_wayland_keymap_map_virtual_modifiers (GdkKeymap *keymap,
}
}
- return TRUE;
+ return retval;
}
static void
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index e7dbaba..b1cb479 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -52,17 +52,6 @@ struct _GdkScreenWayland
int width, height;
int width_mm, height_mm;
- /* Window manager */
- char *window_manager_name;
- /* TRUE if wmspec_check_window has changed since last
- * fetch of _NET_SUPPORTED
- */
- guint need_refetch_net_supported : 1;
- /* TRUE if wmspec_check_window has changed since last
- * fetch of window manager name
- */
- guint need_refetch_wm_name : 1;
-
/* Visual Part */
GdkVisual *argb_visual;
GdkVisual *premultiplied_argb_visual;
@@ -72,21 +61,8 @@ struct _GdkScreenWayland
gint n_monitors;
GdkWaylandMonitor *monitors;
gint primary_monitor;
-
- /* Xft resources for the display, used for default values for
- * the Xft/ XSETTINGS
- */
- gboolean xft_init; /* Whether we've intialized these values yet */
- gboolean xft_antialias;
- gboolean xft_hinting;
- gint xft_hintstyle;
- gint xft_rgba;
- gint xft_dpi;
-
- GdkAtom cm_selection_atom;
- gboolean is_composited;
};
-
+
struct _GdkScreenWaylandClass
{
GdkScreenClass parent_class;
@@ -184,8 +160,6 @@ gdk_wayland_screen_finalize (GObject *object)
g_object_unref (screen_wayland->premultiplied_argb_visual);
g_object_unref (screen_wayland->rgb_visual);
- g_free (screen_wayland->window_manager_name);
-
deinit_multihead (GDK_SCREEN (object));
G_OBJECT_CLASS (_gdk_screen_wayland_parent_class)->finalize (object);
@@ -505,9 +479,6 @@ _gdk_wayland_screen_new (GdkDisplay *display)
screen_wayland = GDK_SCREEN_WAYLAND (screen);
screen_wayland->display = display;
- /* we want this to be always non-null */
- screen_wayland->window_manager_name = g_strdup ("unknown");
-
screen_wayland->width = 8192;
screen_wayland->height = 8192;
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index b7992bf..e2168d8 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -312,7 +312,6 @@ gdk_wayland_window_attach_image (GdkWindow *window)
GDK_DISPLAY_WAYLAND (gdk_window_get_display (window));
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
- struct wl_buffer *buffer;
int32_t server_width, server_height, dx, dy;
if (GDK_WINDOW_DESTROYED (window))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]