Changeset 3575 in Sophya
- Timestamp:
- Feb 12, 2009, 4:12:56 PM (17 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/piwindowx.cc
r3291 r3575 152 152 //if (mWtyp == PIWK_transient) 153 153 XRaiseWindow(mdsp, XtWindow(pwm->XtWdg())); 154 // cmv+rz Fevrier 2009 (retour Moriond) - Suppression de XFlush() / usleep 155 // Probleme regle par gestion VisibilityChange event ds pixtbase.cc 154 156 // cmv+rz 09/08/2007 Ajout XFlush() + usleep 155 157 // pour regler le probleme de perte d'evenement expose a la creation 156 XFlush(mdsp); usleep(5000);158 // XFlush(mdsp); usleep(5000); 157 159 return; 158 160 } -
trunk/SophyaPI/PI/pixtbase.cc
r3572 r3575 143 143 } 144 144 145 // Pour traiter les etats de changements de visibilite de la fenetre 146 /* Nouvelle-Fonction */ 147 void visibchange_handler_pixtbase (Widget wdgp, XtPointer /*closure*/, 148 XEvent* evt, Boolean* cont) 149 { 150 #ifdef DEBUG_PIXTB 151 printf("Debug_visibchange_handler_pixtbase: Wdg= %lx Object= %lx fgvis_expose= %d (EvtType=%d VisSt=%d)\n", 152 (long)wdgp, (long)(((PIXtBaseWidget)wdgp)->pixtbase.objet), 153 ((PIXtBaseWidget)wdgp)->pixtbase.vis_expose_fg, (int)evt->type,(int)evt->xvisibility.state); 154 #endif 155 PIXtBaseWidget bwdg = (PIXtBaseWidget)wdgp; 156 if (bwdg->pixtbase.vis_expose_fg != 1) return; 157 if (evt->xvisibility.state == VisibilityFullyObscured) return; 158 int x0, y0, dx, dy; 159 x0 = y0 = 0; 160 dx = wdgp->core.width; dy = wdgp->core.height; 161 (bwdg->pixtbase.objet)->eXposeProcess(x0, y0, dx, dy); 162 bwdg->pixtbase.vis_expose_fg = 0; 163 } 164 145 165 /* Nouvelle-Fonction */ 146 166 static void init_pixtbase (Widget request, Widget wdg, … … 154 174 // get_GCs (wdgp); 155 175 #ifdef DEBUG_PIXTB 156 printf("Debug_init_pixtbase: Wdg=%lx Object= %lx narg=%d \n", 157 (long)wdgp, (long)(wdgp->pixtbase.objet), (int)(*narg)); 158 #endif 159 return; 160 } 161 162 /* Nouvelle-Fonction */ 163 static void destroy_pixtbase (Widget /*wdgp*/) 176 printf("Debug_init_pixtbase: Wdg=%lx Object= %lx \n", 177 (long)wdgp, (long)(wdgp->pixtbase.objet)); 178 #endif 179 180 // Pour gerer les exposes event avec fenetre non visible ... 181 wdgp->pixtbase.vis_expose_fg = 0; 182 XtAddEventHandler(wdg, VisibilityChangeMask, FALSE, visibchange_handler_pixtbase, NULL); 183 return; 184 } 185 186 /* Nouvelle-Fonction */ 187 static void destroy_pixtbase (Widget wdgp) 164 188 { 165 189 #ifdef DEBUG_PIXTB … … 194 218 (long)(((PIXtBaseWidget)wdgp)->pixtbase.objet) ); 195 219 #endif 196 if (!(wdgp->core.visible)) return; 197 if ( ((PIXtBaseWidget)wdgp)->pixtbase.objet ) 198 { 220 if (!(wdgp->core.visible)) { 221 ((PIXtBaseWidget)wdgp)->pixtbase.vis_expose_fg = 1; 222 return; 223 } 224 if ( ((PIXtBaseWidget)wdgp)->pixtbase.objet ) { 199 225 XRectangle xrec; 200 226 int x0, y0, dx, dy; 201 XClipBox(region, &xrec); 202 x0 = xrec.x; y0 = xrec.y; 203 dx = xrec.width; dy = xrec.height; 227 if (region) { 228 XClipBox(region, &xrec); 229 x0 = xrec.x; y0 = xrec.y; 230 dx = xrec.width; dy = xrec.height; 231 } 232 else { 233 x0 = y0 = 0; 234 dx = wdgp->core.width; dy = wdgp->core.height; 235 } 204 236 (((PIXtBaseWidget)wdgp)->pixtbase.objet)->eXposeProcess(x0, y0, dx, dy); 205 } 237 ((PIXtBaseWidget)wdgp)->pixtbase.vis_expose_fg = 0; 238 } 206 239 return; 207 240 } -
trunk/SophyaPI/PI/pixtbaseP.h
r103 r3575 24 24 PIBaseWdgX * objet; 25 25 unsigned long myeventmask; 26 unsigned int vis_expose_fg; // Gestion des expose_event avec fenetre non visible 26 27 } PIXtBasePart; 27 28
Note:
See TracChangeset
for help on using the changeset viewer.