--- rpl/src/encart.c 2017/08/24 07:07:38 1.65 +++ rpl/src/encart.c 2017/08/24 08:26:43 1.66 @@ -84,9 +84,6 @@ encart(struct_processus *s_etat_processu int y_max; int y_min; - Pixel couleur_arriere_plan; - Pixel couleur_avant_plan; - Pixmap pixmap_rpl; Pixmap pixmap_rpl_masque; @@ -147,6 +144,21 @@ encart(struct_processus *s_etat_processu xmFormWidgetClass, objet_principal, NULL); + XtVaGetValues(objet_principal, + XmNmwmDecorations, &decor, + XmNmwmFunctions, &fonctions, + NULL); + + decor &= ~(MWM_DECOR_ALL + MWM_DECOR_MAXIMIZE + MWM_DECOR_RESIZEH + + MWM_DECOR_TITLE + MWM_DECOR_MENU + MWM_DECOR_BORDER); + fonctions &= ~(MWM_FUNC_ALL + MWM_FUNC_RESIZE + MWM_FUNC_CLOSE + + MWM_FUNC_MINIMIZE + MWM_FUNC_MAXIMIZE); + + XtVaSetValues(objet_principal, + XmNmwmDecorations, decor, + XmNmwmFunctions, fonctions, + NULL); + cadre = XtVaCreateManagedWidget("rplExternalFrame", xmFrameWidgetClass, form, XmNtopAttachment, XmATTACH_FORM, @@ -161,11 +173,6 @@ encart(struct_processus *s_etat_processu XmNmarginHeight, 5, NULL); - XtVaGetValues(form, - XmNforeground, &couleur_avant_plan, - XmNbackground, &couleur_arriere_plan, - NULL); - uprintf("0\n"); if ((erreur = XpmCreatePixmapFromData(XtDisplay(form), DefaultRootWindow(XtDisplay(form)), rpl_xpm, @@ -181,21 +188,6 @@ uprintf("0\n"); XmNlabelPixmap, pixmap_rpl, NULL); - XtVaGetValues(objet_principal, - XmNmwmDecorations, &decor, - XmNmwmFunctions, &fonctions, - NULL); - - decor &= ~(MWM_DECOR_ALL + MWM_DECOR_MAXIMIZE + MWM_DECOR_RESIZEH - + MWM_DECOR_TITLE + MWM_DECOR_MENU + MWM_DECOR_BORDER); - fonctions &= ~(MWM_FUNC_ALL + MWM_FUNC_RESIZE + MWM_FUNC_CLOSE - + MWM_FUNC_MINIMIZE + MWM_FUNC_MAXIMIZE); - - XtVaSetValues(objet_principal, - XmNmwmDecorations, decor, - XmNmwmFunctions, fonctions, - NULL); - uprintf("1\n"); if (XineramaIsActive(display) == True) { @@ -381,9 +373,9 @@ uprintf("6\n"); XmDestroyPixmap(XtScreen(form), pixmap_rpl); XmDestroyPixmap(XtScreen(form), pixmap_rpl_masque); - XCloseDisplay(display); XtAppSetWarningHandler(app, old_message_handler); XtDestroyApplicationContext(app); + XCloseDisplay(display); uprintf("7\n"); } # endif