summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan@xfce.org>2017-05-15 09:00:45 +0200
committerOlivier Fourdan <fourdan@xfce.org>2017-05-15 09:09:30 +0200
commit940cfef1c7b5828b951b392b75baecc1638619be (patch)
treee394b8ba9b85d0a9c0f73d09649deca145e14fcf
parent7115d1b4f4021043bb59e6acafa105cb77fe5b9d (diff)
downloadxfwm4-940cfef1c7b5828b951b392b75baecc1638619be.tar.gz
compositor: Remove present env var
Prefer Present over GLX if both are available, and remove the environment variable "XFWM4_USE_PRESENT". Eventually, we'd rather use a command line option instead (TODO).
-rw-r--r--COMPOSITOR18
-rw-r--r--src/compositor.c49
2 files changed, 27 insertions, 40 deletions
diff --git a/COMPOSITOR b/COMPOSITOR
index 381afdc44..6e48a9eee 100644
--- a/COMPOSITOR
+++ b/COMPOSITOR
@@ -40,13 +40,13 @@ The following tips apply to the X.org Xserver X11R6.8.x
Section "Extensions"
Option "Composite" "Enable"
EndSection
-
+
- Save the configuration file and restart the Xserver.
3) Troubleshooting
------------------
-The composite extensions in X.org look fairly new and there are several problems
+The composite extensions in X.org look fairly new and there are several problems
that may arise when using the compositing manager in xfwm4:
- Windows aren't correctly refreshed
@@ -66,7 +66,7 @@ are a few hints that could help categorizing the problem:
ie, when running "xfwm4 --compositor=off; xcompmgr -c"
- Does it show with the Xserver embedded compositor manager?
ie, when running "xfwm4 --compositor=auto"
-
+
If the problem with xcompmgr and/or with the Xserver compositor, then there
is a good chance that the problem is not with xfwm4...
@@ -85,8 +85,8 @@ card, feel free to submit your own tips.
The XRender extension can be very CPU consuming. The NVidia binary closed source
drivers are able to perform the rendering in hardware.
-If you have an NVidia video card and the NVidia binary closed source drivers,
-you can enable the XRender in hardwareby adding the following option to your
+If you have an NVidia video card and the NVidia binary closed source drivers,
+you can enable the XRender in hardwareby adding the following option to your
xorg.conf file:
Option "RenderAccel" "true"
@@ -105,7 +105,7 @@ EndSection
4.2) EXA
~~~~~~~~
-On some card, you may want to try the EXA acceleration by adding
+On some card, you may want to try the EXA acceleration by adding
Option "AccelMethod" "exa"
@@ -128,9 +128,5 @@ Support for those features can be checked using "xfwm4 --version":
- Epoxy support: Yes
...
-If both VSYNC methods are available, xfwm4 will prefer OpenGL. To force the
-use of the present extension, set the environment variable XFWM4_USE_PRESENT
-prior to run xfwm4, e.g.:
-
- $ XFWM4_USE_PRESENT=1 xfwm4 --replace &
+If both VSYNC methods are available, xfwm4 will prefer Present over OpenGL.
diff --git a/src/compositor.c b/src/compositor.c
index 6d623d9a0..dfc279dc9 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4250,10 +4250,6 @@ compositorManageScreen (ScreenInfo *screen_info)
XRenderPictureAttributes pa;
XRenderPictFormat *visual_format;
gushort buffer;
-#ifdef HAVE_PRESENT_EXTENSION
- const gchar *use_present_env;
- gboolean present_requested;
-#endif /* HAVE_PRESENT_EXTENSION */
g_return_val_if_fail (screen_info != NULL, FALSE);
TRACE ("entering compositorManageScreen");
@@ -4369,30 +4365,7 @@ compositorManageScreen (ScreenInfo *screen_info)
XClearArea (display_info->dpy, screen_info->output, 0, 0, 0, 0, TRUE);
TRACE ("Manual compositing enabled");
-#ifdef HAVE_EPOXY
- screen_info->glx_context = None;
- screen_info->glx_window = None;
- screen_info->rootTexture = None;
- screen_info->glx_drawable = None;
- screen_info->texture_filter = GL_LINEAR;
-#ifdef HAVE_PRESENT_EXTENSION
- use_present_env = g_getenv ("XFWM4_USE_PRESENT");
- present_requested = (g_strcmp0 (use_present_env, "1") == 0);
- if (present_requested)
- {
- screen_info->use_glx = FALSE;
- }
- else
-#endif /* HAVE_PRESENT_EXTENSION */
- {
- screen_info->use_glx = init_glx (screen_info);
- }
-#else /* HAVE_EPOXY */
- screen_info->use_glx = FALSE;
-#endif /* HAVE_EPOXY */
-
#ifdef HAVE_PRESENT_EXTENSION
- /* Prefer glx over xpresent if available */
screen_info->use_present = display_info->have_present && !screen_info->use_glx;
if (screen_info->use_present)
{
@@ -4401,14 +4374,32 @@ compositorManageScreen (ScreenInfo *screen_info)
screen_info->output,
PresentCompleteNotifyMask);
}
- else if (present_requested)
+ else
{
- g_warning ("XPresent requested but unavailable");
+ g_warning ("XPresent not available");
}
#else /* HAVE_PRESENT_EXTENSION */
screen_info->use_present = FALSE;
#endif /* HAVE_PRESENT_EXTENSION */
+#ifdef HAVE_EPOXY
+ if (!screen_info->use_present)
+ {
+ screen_info->glx_context = None;
+ screen_info->glx_window = None;
+ screen_info->rootTexture = None;
+ screen_info->glx_drawable = None;
+ screen_info->texture_filter = GL_LINEAR;
+ screen_info->use_glx = init_glx (screen_info);
+ }
+ else
+ {
+ g_warning ("GL not available");
+ }
+#else /* HAVE_EPOXY */
+ screen_info->use_glx = FALSE;
+#endif /* HAVE_EPOXY */
+
if (screen_info->use_glx)
{
DBG ("Compositor using GLX for vsync");