From 042eb6765f807fac4c794e813503e1c07230df88 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 21 Aug 2015 21:08:36 +0200 Subject: Fixing unchecked casts --- Linux_C_12/cCrossCallWindows_121.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Linux_C_12/cCrossCallWindows_121.c') diff --git a/Linux_C_12/cCrossCallWindows_121.c b/Linux_C_12/cCrossCallWindows_121.c index 30fa5b0..39cab67 100644 --- a/Linux_C_12/cCrossCallWindows_121.c +++ b/Linux_C_12/cCrossCallWindows_121.c @@ -998,16 +998,19 @@ void EvalCcRqGETWINDOWSIZE (CrossCallInfo *pcci) /* hwnd; width,height result. * /* Set the size of windows/controls. */ void EvalCcRqSETWINDOWSIZE (CrossCallInfo *pcci) /* hwnd, w,h, update; no result. */ { - GtkWindow *window; + GtkWidget *element; gint width, height; gboolean update,inclScrollbars; - /* printf("EvalCcRqSETWINDOWSIZE\n"); */ - window = GTK_WINDOW(pcci->p1); + printf("EvalCcRqSETWINDOWSIZE\n"); + element = GTK_WIDGET(pcci->p1); width = pcci->p2; height = pcci->p3; update = pcci->p4; - gtk_window_resize(window, width, height); + if (GTK_IS_WINDOW(element)) + gtk_window_resize(GTK_WINDOW(element), width, height); + else + gtk_widget_set_size_request(element, width, height); #if 0 if (update!=0) /* still, updates are not sufficient using SetWindowPos only. */ UpdateWindowScrollbars (hwnd); -- cgit v1.2.3