wayland: Trim some unused struct fields

This commit is contained in:
Kristian Høgsberg 2011-02-11 09:50:10 -05:00
parent f2ac8c7ce3
commit 6eac07d4f6
5 changed files with 3 additions and 77 deletions

View File

@ -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]);

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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))