Hi,

I've noticed that sometimes the keyboard navigation gets broken. This
is exhibited by the attached code. Run the program, navigate on one of
the buttons, press Space to press the button : this will lead to a
redraw of the display with larger buttons. From there on, the focus
does not work anymore.

Fr�d�ric
                                  
#include <picogui.h>
#include <stdio.h>

static pghandle box;

static int
handler (struct pgEvent *evt)
{
  printf ("growing up\n");

  pgSetWidget (box, 
               PG_WP_SIDE, PG_S_LEFT,
               PG_WP_SIZE, 110,
               0);
}

int
main (int argc, char * argv [])
{
  pghandle btn;

  pgInit (argc, argv);

  pgRegisterApp (PG_APP_NORMAL, "Test",
                 0);

  box = pgNewWidget (PG_WIDGET_BOX, 0, 0);

  pgSetWidget (0, 
               PG_WP_SIDE, PG_S_LEFT,
               PG_WP_SIZE, 100,
               0);


  btn = pgNewWidget (PG_WIDGET_BUTTON, 
                     PG_DERIVE_INSIDE, 0);

  pgBind (btn, PG_WE_ACTIVATE, handler, NULL);

  pgSetWidget (0, 
               PG_WP_SIDE, PG_S_TOP,
               PG_WP_TEXT, pgNewString ("A"), 
               0);

  pgNewWidget (PG_WIDGET_BUTTON, PG_DERIVE_AFTER, 0);

  pgBind (btn, PG_WE_ACTIVATE, handler, NULL);

  pgSetWidget (0, 
               PG_WP_SIDE, PG_S_TOP,
               PG_WP_TEXT, pgNewString ("B"), 
               0);

  pgEventLoop ();
}

Attachment: msg00700/pgp00000.pgp
Description: PGP signature

Reply via email to