[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XForms] Canvas / button interaction

From: Clive Stubbings
Subject: [XForms] Canvas / button interaction
Date: Thu, 9 Feb 2012 11:14:59 +0000 (GMT)

I have recently been doing that dreaded periodic fork-lift linux update. It always throws up some troublesome issues. This one is particularly wierd.

I have an old app, been working for years. Tried running it on a new system and various bits of the gui didn't display right. It looked like a 'flush' issue but fl_update_display() did not help. . However the issue shows up even if I run the old app on the old system but put just the display over the network onto the new platform. New platform is Arch Linux. Building against different libraries didn't change anything. The arch xforms package is 1.0.94pre4-1, I was using something older..

I boiled it down to the example below. If the canvas object is created then the checkbutton does not light when you press it. If the canvas object is not created, the check button works fine. I believe that the object sees the mouse button press because in the bigger app, I could see callbacks happening.

On my old system this works fine in both cases. So my take is this is an X server interaction issue with a new Xorg. The X is X.Org X Server 1.11.4
Release Date: 2012-01-27, X Protocol Version 11, Revision 0.
Or am I missing something obvious.

Anyone got any ideas?


If I build

        gcc test1.c -lforms -o test1

the button works, but if I build

        gcc -DCANVAS test1.c -lforms -o test1

It doesn't..

#include <stdio.h>
#include <forms.h>

typedef struct {
        FL_FORM *main;
        void *vdata;
        char *cdata;
        long  ldata;
        FL_OBJECT *image;
        FL_OBJECT *toggle;
} FD_main;

FD_main *create_form_main(void)
        FL_OBJECT *obj;
        FD_main *fdui = (FD_main *) fl_calloc(1, sizeof(*fdui));

        fdui->main = fl_bgn_form(FL_NO_BOX, 300, 200);
        obj = fl_add_box(FL_UP_BOX,0,0,1010,565,"");
#ifdef CANVAS
        fdui->image = obj = fl_add_canvas(FL_NORMAL_CANVAS,10,10,80,50,"");
        fdui->toggle = obj = 
        fdui->main->fdui = fdui;
        return fdui;

main(int argc, char *argv[])
        FD_main *maingui;

        fl_initialize(&argc, argv, "Test", NULL, 0);
        maingui= create_form_main();

        while (1) {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]