diff options
author | Camil Staps | 2015-08-21 21:08:36 +0200 |
---|---|---|
committer | Camil Staps | 2015-08-21 21:08:36 +0200 |
commit | 042eb6765f807fac4c794e813503e1c07230df88 (patch) | |
tree | 4ee829c43ec2dfe954d5c560f1561a5913e0d4fa /Linux_C_12/cCrossCallWindows_121.c | |
parent | Fixing unsafe cast to GtkCheckMenuItem (diff) |
Fixing unchecked casts
Diffstat (limited to 'Linux_C_12/cCrossCallWindows_121.c')
-rw-r--r-- | Linux_C_12/cCrossCallWindows_121.c | 11 |
1 files changed, 7 insertions, 4 deletions
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);
|