Diff for /rpl/src/encart.c between versions 1.66 and 1.74

version 1.66, 2017/08/24 08:26:43 version 1.74, 2020/01/10 11:15:42
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.28    RPL/2 (R) version 4.1.32
   Copyright (C) 1989-2017 Dr. BERTRAND Joël    Copyright (C) 1989-2020 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 40  valeur_erreur(logical1 nouvelle_valeur) Line 40  valeur_erreur(logical1 nouvelle_valeur)
     return(registre);      return(registre);
 }  }
   
   #ifdef MOTIF_SUPPORT
 static int  static int
 _XlibErrorHandler(Display *display, XErrorEvent *event)  _XlibErrorHandler(Display *display, XErrorEvent *event)
 {  {
Line 53  _XtWarningHandler(String message) Line 54  _XtWarningHandler(String message)
 {  {
     return;      return;
 }  }
   #endif
   
 void  void
 encart(struct_processus *s_etat_processus, integer8 duree)  encart(struct_processus *s_etat_processus, integer8 duree)
Line 90  encart(struct_processus *s_etat_processu Line 92  encart(struct_processus *s_etat_processu
     Position            hauteur_popup;      Position            hauteur_popup;
     Position            largeur_popup;      Position            largeur_popup;
   
       Screen              *screen;
   
     String              *argv;      String              *argv;
   
     struct timespec     attente;      struct timespec     attente;
Line 173  encart(struct_processus *s_etat_processu Line 177  encart(struct_processus *s_etat_processu
                 XmNmarginHeight, 5,                  XmNmarginHeight, 5,
                 NULL);                  NULL);
                   
 uprintf("0\n");  
         if ((erreur = XpmCreatePixmapFromData(XtDisplay(form),          if ((erreur = XpmCreatePixmapFromData(XtDisplay(form),
                 DefaultRootWindow(XtDisplay(form)), rpl_xpm,                  DefaultRootWindow(XtDisplay(form)), rpl_xpm,
                 &pixmap_rpl, &pixmap_rpl_masque, NULL)) != 0)                  &pixmap_rpl, &pixmap_rpl_masque, NULL)) != XpmSuccess)
         {          {
             (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;              (*s_etat_processus).erreur_systeme = d_es_allocation_memoire;
             return;              return;
Line 188  uprintf("0\n"); Line 191  uprintf("0\n");
                 XmNlabelPixmap, pixmap_rpl,                  XmNlabelPixmap, pixmap_rpl,
                 NULL);                  NULL);
   
 uprintf("1\n");  
         if (XineramaIsActive(display) == True)          if (XineramaIsActive(display) == True)
         {          {
             // Récupération de la localisation des différents écrans              // Récupération de la localisation des différents écrans
Line 281  uprintf("1\n"); Line 283  uprintf("1\n");
             offset_x = 0;              offset_x = 0;
             offset_y = 0;              offset_y = 0;
         }          }
 uprintf("2\n");  
   
 #if 0  #if 0
         XtRealizeWidget(objet_principal);          XtRealizeWidget(objet_principal);
Line 308  uprintf("2\n"); Line 309  uprintf("2\n");
   
         XtRealizeWidget(objet_principal);          XtRealizeWidget(objet_principal);
 #endif  #endif
 uprintf("3\n");  
   
         XFlush(XtDisplay(form));          XFlush(XtDisplay(form));
 uprintf("3a\n");  
   
         attente.tv_sec = 0;          attente.tv_sec = 0;
         attente.tv_nsec = 1000;          attente.tv_nsec = 1000;
Line 320  uprintf("3a\n"); Line 319  uprintf("3a\n");
   
         do          do
         {          {
 uprintf("3b\n");  
             if (XtAppPending(app) != 0)              if (XtAppPending(app) != 0)
             {              {
 uprintf("3c\n");  
                 XtAppNextEvent(app, &evenement);                  XtAppNextEvent(app, &evenement);
 uprintf("3d\n");  
                 XtDispatchEvent(&evenement);                  XtDispatchEvent(&evenement);
 uprintf("3e\n");  
             }              }
 uprintf("3f\n");  
   
             nanosleep(&attente, NULL);              nanosleep(&attente, NULL);
             gettimeofday(&horodatage_final, NULL);              gettimeofday(&horodatage_final, NULL);
Line 348  uprintf("3f\n"); Line 342  uprintf("3f\n");
                 + ((double) temps_ecoule.tv_sec))                  + ((double) temps_ecoule.tv_sec))
                 < (((double) duree) / ((double) 1000000)));                  < (((double) duree) / ((double) 1000000)));
   
 uprintf("4\n");  
         XtUnrealizeWidget(objet_principal);          XtUnrealizeWidget(objet_principal);
 uprintf("5\n");  
   
         while(XtAppPending(app) == 0)          while(XtAppPending(app) == 0)
         {          {
Line 364  uprintf("5\n"); Line 356  uprintf("5\n");
             nanosleep(&attente, NULL);              nanosleep(&attente, NULL);
         }          }
   
           screen = XtScreen(form);
   
         XtDestroyWidget(pixmap);          XtDestroyWidget(pixmap);
         XtDestroyWidget(cadre);          XtDestroyWidget(cadre);
         XtDestroyWidget(form);          XtDestroyWidget(form);
         XtDestroyWidget(objet_principal);          XtDestroyWidget(objet_principal);
   
 uprintf("6\n");          XmDestroyPixmap(screen, pixmap_rpl);
         XmDestroyPixmap(XtScreen(form), pixmap_rpl);          XmDestroyPixmap(screen, pixmap_rpl_masque);
         XmDestroyPixmap(XtScreen(form), pixmap_rpl_masque);  
   
         XtAppSetWarningHandler(app, old_message_handler);          XtAppSetWarningHandler(app, old_message_handler);
         XtDestroyApplicationContext(app);          XtDestroyApplicationContext(app);
         XCloseDisplay(display);          XCloseDisplay(display);
 uprintf("7\n");  
     }      }
 #   endif  #   endif
   

Removed from v.1.66  
changed lines
  Added in v.1.74


CVSweb interface <joel.bertrand@systella.fr>