Changeset 21480 in vbox
- Timestamp:
- Jul 10, 2009 1:37:49 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49913
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r21105 r21480 37 37 #ifdef Q_WS_X11 38 38 #include <QFontDatabase> 39 #include <iprt/env.h> 39 40 #endif 40 41 … … 323 324 /* scope the QIApplication variable */ 324 325 { 326 #if defined(Q_WS_X11) && (QT_VERSION >= 0x040500) 327 /* There are some buggy/strange driver/compiz combinations which lead 328 * to transparent backgrounds on ARGB visuals. Try to fix it by not 329 * allowing an ARGB visual with the help of the Xlib. After that we 330 * restore the original environment, so that others like the OpenGL 331 * service will proper work. */ 332 RTENV env = NIL_RTENV; 333 char envval[1024]; 334 bool found = false; 335 int rc = RTEnvClone (&env, RTENV_DEFAULT); 336 if (RT_SUCCESS (rc)) 337 { 338 found = RTEnvGetEx (env, "XLIB_SKIP_ARGB_VISUALS", envval, sizeof(envval), NULL) == VINF_SUCCESS; 339 RTEnvSetEx (env, "XLIB_SKIP_ARGB_VISUALS", "1"); 340 } 341 /* Now create the application object */ 325 342 QIApplication a (argc, argv); 343 /* Restore previous environment */ 344 if (env != NIL_RTENV) 345 { 346 if (found) 347 RTEnvSetEx (env, "XLIB_SKIP_ARGB_VISUALS", envval); 348 else 349 RTEnvUnsetEx (env, "XLIB_SKIP_ARGB_VISUALS"); 350 RTEnvDestroy (env); 351 } 352 #else /* defined(Q_WS_X11) && (QT_VERSION >= 0x040500) */ 353 QIApplication a (argc, argv); 354 #endif /* defined(Q_WS_X11) && (QT_VERSION >= 0x040500) */ 326 355 327 356 /* Qt4.3 version has the QProcess bug which freezing the application
Note:
See TracChangeset
for help on using the changeset viewer.