summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2018-06-10 20:51:05 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2018-06-10 21:21:01 +0000
commit58fc1229c1850a7e9bebe2ee4684adc2d6235365 (patch)
treea21defb230788c615b2518424ec543b54a0b5347
parent10b2f6540a32f24fe11d2e87a9ac21f1e1ae0762 (diff)
downloadgtk+-58fc1229c1850a7e9bebe2ee4684adc2d6235365.tar.gz
Remove unused variables (mostly in W32 code)
-rw-r--r--gdk/win32/gdkcairocontext-win32.c9
-rw-r--r--gdk/win32/gdkclipboard-win32.c5
-rw-r--r--gdk/win32/gdkclipdrop-win32.c4
-rw-r--r--gdk/win32/gdkdevice-wintab.c4
-rw-r--r--gdk/win32/gdkdrop-win32.c2
-rw-r--r--gdk/win32/gdkevents-win32.c13
-rw-r--r--gdk/win32/gdkhdataoutputstream-win32.c1
-rw-r--r--gdk/win32/gdkscreen-win32.c1
-rw-r--r--gdk/win32/gdksurface-win32.c14
-rw-r--r--gtk/gtkimcontextime.c1
-rw-r--r--gtk/gtkprintoperation-win32.c4
-rw-r--r--gtk/gtkwindow.c2
12 files changed, 3 insertions, 57 deletions
diff --git a/gdk/win32/gdkcairocontext-win32.c b/gdk/win32/gdkcairocontext-win32.c
index 5868a270ed..90ea656b95 100644
--- a/gdk/win32/gdkcairocontext-win32.c
+++ b/gdk/win32/gdkcairocontext-win32.c
@@ -59,7 +59,6 @@ gdk_win32_surface_apply_queued_move_resize (GdkSurface *surface,
{
if (!IsIconic (GDK_SURFACE_HWND (surface)))
{
- GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
GDK_NOTE (EVENTS, g_print ("Setting window position ... "));
API_CALL (SetWindowPos, (GDK_SURFACE_HWND (surface),
@@ -122,12 +121,9 @@ static cairo_surface_t *
create_cairo_surface_for_surface (GdkSurface *surface,
int scale)
{
- GdkDisplay *display;
cairo_surface_t *cairo_surface;
HDC hdc;
- display = gdk_surface_get_display (surface);
-
hdc = GetDC (GDK_SURFACE_HWND (surface));
if (!hdc)
{
@@ -146,9 +142,7 @@ gdk_win32_cairo_context_begin_frame (GdkDrawContext *draw_context,
cairo_region_t *region)
{
GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context);
- GdkRectangle clip_box;
GdkSurface *surface;
- double sx, sy;
GdkSurfaceImplWin32 *impl;
int scale;
cairo_t *cr;
@@ -244,13 +238,10 @@ gdk_win32_cairo_context_end_frame (GdkDrawContext *draw_context,
GdkWin32CairoContext *self = GDK_WIN32_CAIRO_CONTEXT (draw_context);
GdkSurface *surface;
gint scale;
- GdkSurfaceImplWin32 *impl;
surface = gdk_draw_context_get_surface (draw_context);
scale = gdk_surface_get_scale_factor (surface);
- impl = GDK_SURFACE_IMPL_WIN32 (surface->impl);
-
/* The code to resize double-buffered windows immediately
* before blitting the buffer contents onto them used
* to be here.
diff --git a/gdk/win32/gdkclipboard-win32.c b/gdk/win32/gdkclipboard-win32.c
index a5cfe28d96..1405463a68 100644
--- a/gdk/win32/gdkclipboard-win32.c
+++ b/gdk/win32/gdkclipboard-win32.c
@@ -149,8 +149,6 @@ gdk_win32_clipboard_claim_remote (GdkWin32Clipboard *cb)
static void
gdk_win32_clipboard_finalize (GObject *object)
{
- GdkWin32Clipboard *cb = GDK_WIN32_CLIPBOARD (object);
-
G_OBJECT_CLASS (gdk_win32_clipboard_parent_class)->finalize (object);
}
@@ -224,10 +222,7 @@ gdk_win32_clipboard_read_async (GdkClipboard *clipboard,
GAsyncReadyCallback callback,
gpointer user_data)
{
- GdkWin32Clipboard *cb = GDK_WIN32_CLIPBOARD (clipboard);
- GSList *targets;
GTask *task;
- GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
task = g_task_new (clipboard, cancellable, callback, user_data);
g_task_set_priority (task, io_priority);
diff --git a/gdk/win32/gdkclipdrop-win32.c b/gdk/win32/gdkclipdrop-win32.c
index 2675746408..e557337b2f 100644
--- a/gdk/win32/gdkclipdrop-win32.c
+++ b/gdk/win32/gdkclipdrop-win32.c
@@ -2787,7 +2787,6 @@ _gdk_win32_transmute_contentformat (const gchar *from_contentformat,
static GdkAtom
convert_clipboard_selection_to_targets_target (GdkSurface *requestor)
{
- gint fmt;
int i;
int format_count = CountClipboardFormats ();
GArray *targets = g_array_sized_new (FALSE, FALSE, sizeof (GdkWin32ContentFormatPair), format_count);
@@ -3223,9 +3222,8 @@ _gdk_win32_store_clipboard_contentformats (GdkClipboard *cb,
GArray *pairs; /* of GdkWin32ContentFormatPair */
const char * const *mime_types;
gint n_mime_types;
- gint i, offset;
+ gint i;
GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
- GArray *streams;
GdkWin32ClipboardStorePrep *prep;
g_assert (clipdrop->clipboard_window != NULL);
diff --git a/gdk/win32/gdkdevice-wintab.c b/gdk/win32/gdkdevice-wintab.c
index 553d2a3a62..3f499d9a00 100644
--- a/gdk/win32/gdkdevice-wintab.c
+++ b/gdk/win32/gdkdevice-wintab.c
@@ -119,7 +119,6 @@ gdk_device_wintab_query_state (GdkDevice *device,
GdkDeviceWintab *device_wintab;
POINT point;
HWND hwnd, hwndc;
- GdkSurfaceImplWin32 *impl;
int scale;
device_wintab = GDK_DEVICE_WINTAB (device);
@@ -231,7 +230,6 @@ _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
gint root_x, root_y;
gdouble temp_x, temp_y;
gint i;
- GdkDisplay *display;
device = GDK_DEVICE (device_wintab);
impl_surface = _gdk_surface_get_impl_surface (window);
@@ -239,8 +237,6 @@ _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
gdk_surface_get_origin (impl_surface, &root_x, &root_y);
- display = gdk_device_get_display (device);
-
for (i = 0; i < gdk_device_get_n_axes (device); i++)
{
GdkAxisUse use;
diff --git a/gdk/win32/gdkdrop-win32.c b/gdk/win32/gdkdrop-win32.c
index 5c3018985c..d9b48fbf55 100644
--- a/gdk/win32/gdkdrop-win32.c
+++ b/gdk/win32/gdkdrop-win32.c
@@ -526,7 +526,6 @@ idroptarget_drop (LPDROPTARGET This,
{
target_drag_context *ctx = (target_drag_context *) This;
GdkWin32DropContext *context_win32 = GDK_WIN32_DROP_CONTEXT (ctx->context);
- GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
gint pt_x = pt.x / context_win32->scale + _gdk_offset_x;
gint pt_y = pt.y / context_win32->scale + _gdk_offset_y;
@@ -895,7 +894,6 @@ gdk_win32_drop_context_drop_finish (GdkDragContext *context,
guint32 time)
{
GdkDragContext *src_context;
- GdkEvent *tmp_event;
GdkWin32Clipdrop *clipdrop = _gdk_win32_clipdrop_get ();
g_return_if_fail (context != NULL);
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index ac8186c2b0..86975b774d 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -769,7 +769,6 @@ void
_gdk_win32_print_event (const GdkEvent *event)
{
gchar *escaped, *kvname;
- const char *selection_name, *target_name, *property_name;
g_print ("%s%*s===> ", (debug_indent > 0 ? "\n" : ""), debug_indent, "");
switch (event->any.type)
@@ -1029,7 +1028,6 @@ apply_message_filters (GdkDisplay *display,
GList **filters)
{
GdkWin32MessageFilterReturn result = GDK_WIN32_MESSAGE_FILTER_CONTINUE;
- GList *node;
GList *tmp_list;
tmp_list = *filters;
@@ -1757,13 +1755,10 @@ static void
handle_dpi_changed (GdkSurface *window,
MSG *msg)
{
- HWND hwnd = GDK_SURFACE_HWND (window);
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
GdkDisplay *display = gdk_display_get_default ();
GdkWin32Display *win32_display = GDK_WIN32_DISPLAY (display);
- GdkDevice *device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
RECT *rect = (RECT *)msg->lParam;
- GdkEvent *event;
guint old_scale = impl->surface_scale;
/* MSDN for WM_DPICHANGED: dpi_x == dpi_y here, so LOWORD (msg->wParam) == HIWORD (msg->wParam) */
@@ -2036,15 +2031,12 @@ handle_wm_sysmenu (GdkSurface *window, MSG *msg, gint *ret_valp)
{
GdkSurfaceImplWin32 *impl;
LONG_PTR style, tmp_style;
- gboolean maximized, minimized;
LONG_PTR additional_styles;
impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
style = GetWindowLongPtr (msg->hwnd, GWL_STYLE);
- maximized = IsZoomed (msg->hwnd) || (style & WS_MAXIMIZE);
- minimized = IsIconic (msg->hwnd) || (style & WS_MINIMIZE);
additional_styles = 0;
if (!(style & WS_SYSMENU))
@@ -2252,17 +2244,12 @@ gdk_event_translate (MSG *msg,
GdkSurface *grab_window = NULL;
gint button;
- GdkAtom target;
gchar buf[256];
gboolean return_val = FALSE;
int i;
- GdkWin32Clipdrop *clipdrop = NULL;
-
- STGMEDIUM *property_change_data;
-
display = gdk_display_get_default ();
win32_display = GDK_WIN32_DISPLAY (display);
diff --git a/gdk/win32/gdkhdataoutputstream-win32.c b/gdk/win32/gdkhdataoutputstream-win32.c
index 0a9d35b71b..9c46fcc351 100644
--- a/gdk/win32/gdkhdataoutputstream-win32.c
+++ b/gdk/win32/gdkhdataoutputstream-win32.c
@@ -341,7 +341,6 @@ gdk_win32_hdata_output_stream_class_init (GdkWin32HDataOutputStreamClass *klass)
static void
gdk_win32_hdata_output_stream_init (GdkWin32HDataOutputStream *stream)
{
- GdkWin32HDataOutputStreamPrivate *priv = gdk_win32_hdata_output_stream_get_instance_private (stream);
}
GOutputStream *
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index 56e7886803..94c404c819 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -51,7 +51,6 @@ init_root_window_size (GdkWin32Screen *screen)
GdkDisplay *display = _gdk_display;
int monitor_count;
GdkMonitor *monitor;
- GdkSurfaceImplWin32 *root_impl;
monitor_count = gdk_display_get_n_monitors (display);
monitor = gdk_display_get_monitor (display, 0);
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index a1d38da790..ee5b413f03 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -185,8 +185,6 @@ _gdk_surface_impl_win32_get_type (void)
static void
gdk_surface_impl_win32_init (GdkSurfaceImplWin32 *impl)
{
- GdkDisplay *display = gdk_display_get_default ();
-
impl->hicon_big = NULL;
impl->hicon_small = NULL;
impl->hint_flags = 0;
@@ -391,7 +389,6 @@ static ATOM
RegisterGdkClass (GdkSurfaceType wtype, GdkSurfaceTypeHint wtype_hint)
{
static ATOM klassTOPLEVEL = 0;
- static ATOM klassCHILD = 0;
static ATOM klassTEMP = 0;
static ATOM klassTEMPSHADOW = 0;
static HICON hAppIcon = NULL;
@@ -1337,7 +1334,6 @@ gdk_win32_surface_resize (GdkSurface *window,
else
{
RECT outer_rect;
- GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
get_outer_rect (window, width, height, &outer_rect);
@@ -1881,11 +1877,6 @@ gdk_win32_surface_get_geometry (GdkSurface *window,
gint *width,
gint *height)
{
- GdkDisplay *display;
- gboolean window_is_root;
-
- display = gdk_surface_get_display (window);
-
if (!GDK_SURFACE_DESTROYED (window))
{
RECT rect;
@@ -3770,7 +3761,6 @@ handle_aerosnap_move_resize (GdkSurface *window,
gint halfright = 0;
gint fullup = 0;
gboolean fullup_edge = FALSE;
- GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
if (context->op == GDK_WIN32_DRAGOP_RESIZE)
switch (context->edge)
@@ -4024,7 +4014,6 @@ setup_drag_move_resize_context (GdkSurface *window,
const gchar *cursor_name;
GdkSurface *pointer_window;
GdkSurfaceImplWin32 *impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
- GdkDisplay *display = gdk_device_get_display (device);
gboolean maximized = gdk_surface_get_state (window) & GDK_SURFACE_STATE_MAXIMIZED;
/* Before we drag, we need to undo any maximization or snapping.
@@ -5296,7 +5285,6 @@ gdk_win32_surface_get_impl_hwnd (GdkSurface *window)
static void
gdk_win32_cairo_surface_destroy (void *data)
{
- GdkSurfaceImplWin32 *impl = data;
}
BOOL WINAPI
@@ -5421,8 +5409,6 @@ _gdk_win32_surface_get_scale_factor (GdkSurface *window)
GdkSurfaceImplWin32 *impl;
GdkWin32Display *win32_display;
- UINT dpix, dpiy;
- gboolean is_scale_acquired;
if (GDK_SURFACE_DESTROYED (window))
return 1;
diff --git a/gtk/gtkimcontextime.c b/gtk/gtkimcontextime.c
index ae382c26ae..706c1e54f2 100644
--- a/gtk/gtkimcontextime.c
+++ b/gtk/gtkimcontextime.c
@@ -1050,7 +1050,6 @@ gtk_im_context_ime_message_filter (GdkWin32Display *display,
if (msg->lParam & GCS_RESULTSTR)
{
gsize len;
- gchar *utf8str = NULL;
GError *error = NULL;
len = ImmGetCompositionStringW (himc, GCS_RESULTSTR, NULL, 0);
diff --git a/gtk/gtkprintoperation-win32.c b/gtk/gtkprintoperation-win32.c
index db7247e0e4..ca7c1be125 100644
--- a/gtk/gtkprintoperation-win32.c
+++ b/gtk/gtkprintoperation-win32.c
@@ -1402,10 +1402,6 @@ pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
*/
if (message == WM_SIZE)
{
- GtkAllocation alloc;
- alloc.width = LOWORD (lparam);
- alloc.height = HIWORD (lparam);
-
gtk_widget_queue_resize (op_win32->embed_widget);
}
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index f53aa6855a..5e5950f056 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1873,7 +1873,9 @@ gtk_window_init (GtkWindow *window)
GtkWidget *widget;
GtkCssNode *widget_node;
GdkSeat *seat;
+#ifdef GDK_WINDOWING_X11
GdkContentFormats *targets;
+#endif
widget = GTK_WIDGET (window);