Hello community, here is the log from the commit of package compiz for openSUSE:Factory checked in at 2015-11-26 17:03:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/compiz (Old) and /work/SRC/openSUSE:Factory/.compiz.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "compiz" Changes: -------- --- /work/SRC/openSUSE:Factory/compiz/compiz.changes 2014-10-29 21:11:20.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.compiz.new/compiz.changes 2015-11-26 17:03:57.000000000 +0100 @@ -1,0 +2,38 @@ +Fri Nov 20 08:32:20 UTC 2015 - sor.alexei@meowr.ru + +- Add compiz-add-manager-checks.patch: add all relevant checks + from compiz-manager; and pciutils dependency. +- Get from Ubuntu packages a script to generate MATE Control Centre + keybinding XML's. + +------------------------------------------------------------------- +Mon Nov 9 11:48:58 UTC 2015 - sor.alexei@meowr.ru + +- Update to 0.8.9. +- Update dependencies and license. +- Split libdecoration0. +- Split plugins from compiz to compiz-plugins, make compiz + recommend compiz-plugins and compiz-plugins to recommend + compiz-plugins-main. +- compiz-gnome to recommend compiz-plugins-main and suggest ccsm. +- compiz-gnome doesn't have to depend on GNOME Control Centre and + gnome-desktop2. +- Rebase compiz-default-settings.diff. +- Remove dummy compiz-kde4 package. +- Do not recommend compiz-emerald. +- Merely suggest compicc instead of recommending. +- Drop kde-compiz.desktop and startkde-compiz: no longer used. +- Remove compiz-kde-4.9.patch, kde-auto-comp.diff, + compiz-0.8.8-non-abstract-KWD-Window.patch, + compiz-global_Region_define.patch: KDE-related. +- Restore standalone locales, place in compiz-lang. +- Change compiz-devel group to "Development/Languages/C and C++". +- Tickle default enabled plugins. +- Move matecompat and svg plugins from compiz-gnome to compiz. +- Adjust compiz-decorator script for MATE. +- Add mate-window-decorator wrapper that adjusts gwd settings with + Marco or Metacity ones. +- Drop support of old openSUSE. +- Add baselibs.conf. + +------------------------------------------------------------------- Old: ---- compiz-0.8.8-non-abstract-KWD-Window.patch compiz-0.8.8.tar.bz2 compiz-decorator compiz-global_Region_define.patch compiz-kde-4.9.patch kde-auto-comp.diff kde-compiz.desktop startkde-compiz New: ---- baselibs.conf compiz-0.8.9.tar.gz compiz-add-manager-checks.patch compiz-decorator.sh compiz.desktop mate-window-decorator.py ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ compiz.spec ++++++ ++++ 754 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/compiz/compiz.spec ++++ and /work/SRC/openSUSE:Factory/.compiz.new/compiz.spec ++++++ baselibs.conf ++++++ libdecoration0 ++++++ compiz-add-manager-checks.patch ++++++ Add all relevant checks from compiz-manager. Authors: Travis Watkins <amaranth@ubuntu.com> Sorokin Alexei <sor.alexei@meowr.ru> --- --- a/include/compiz-core.h +++ b/include/compiz-core.h @@ -1126,6 +1126,9 @@ logMessage (const char *componentName, const char * logLevelToString (CompLogLevel level); +void +launchFallbackWM (void); + int compCheckForError (Display *dpy); --- a/src/main.c +++ b/src/main.c @@ -159,6 +159,30 @@ logLevelToString (CompLogLevel level) return "Unknown"; } +void +launchFallbackWM (void) +{ + char *fallback = NULL; + + if (strcmp (getenv ("XDG_CURRENT_DESKTOP"), "MATE") == 0) + fallback = "marco"; + else if (strcmp (getenv ("XDG_CURRENT_DESKTOP"), "GNOME") == 0 || strcmp (getenv ("XDG_CURRENT_DESKTOP"), "GNOME") == 0) + fallback = "metacity"; + else if (access ("/usr/bin/xfwm4", F_OK) == 0) + fallback = "xfwm4"; + else if (access ("/usr/bin/icewm", F_OK) == 0) + fallback = "icewm"; + + printf ("\nLaunching fallback window manager\n"); + if (fallback != NULL) + execlp (fallback, fallback, "--replace", (char *)NULL); + else + execlp ("xterm", "xterm", (char *)NULL); + + /* we should never get here but if we do just exit */ + exit (EXIT_FAILURE); +} + static void signalHandler (int sig) { @@ -168,6 +192,9 @@ signalHandler (int sig) case SIGCHLD: waitpid (-1, &status, WNOHANG | WUNTRACED); break; + case SIGSEGV: + launchFallbackWM (); + break; case SIGHUP: restartSignal = TRUE; break; @@ -270,6 +297,7 @@ main (int argc, char **argv) signal (SIGCHLD, signalHandler); signal (SIGINT, signalHandler); signal (SIGTERM, signalHandler); + signal (SIGSEGV, signalHandler); emptyRegion.rects = &emptyRegion.extents; emptyRegion.numRects = 0; @@ -288,6 +316,13 @@ main (int argc, char **argv) memset (&ctx, 0, sizeof (ctx)); + /* if no options are passed run with defaults */ + if (argc == 1) + { + useDesktopHints = FALSE; + replaceCurrentWm = TRUE; + } + for (i = 1; i < argc; i++) { if (!strcmp (argv[i], "--help")) @@ -399,6 +434,16 @@ main (int argc, char **argv) clientId = getenv ("DESKTOP_AUTOSTART_ID"); } + /* add in default plugins if none are given */ + if (nPlugin == 0) + { + plugin[nPlugin++] = "ccp"; + plugin[nPlugin++] = "move"; + plugin[nPlugin++] = "resize"; + plugin[nPlugin++] = "place"; + plugin[nPlugin++] = "decoration"; + } + if (refreshRateArg) { ctx.refreshRateData = malloc (strlen (refreshRateArg) + 256); @@ -470,10 +515,20 @@ main (int argc, char **argv) coreInitialized = TRUE; if (!disableSm) + { + if (clientId == NULL) + { + char *desktop_autostart_id = getenv ("DESKTOP_AUTOSTART_ID"); + if (desktop_autostart_id != NULL) + clientId = strdup (desktop_autostart_id); + unsetenv ("DESKTOP_AUTOSTART_ID"); + } + initSession (clientId); + } if (!addDisplay (displayName)) - return 1; + launchFallbackWM (); eventLoop (); --- a/src/screen.c +++ b/src/screen.c @@ -1728,7 +1728,7 @@ addScreen (CompDisplay *display, Window *children; unsigned int nchildren; int defaultDepth, nvisinfo, nElements, value, i; - const char *glxExtensions, *glExtensions; + const char *glxExtensions, *glExtensions, *glRenderer; XSetWindowAttributes attrib; GLfloat globalAmbient[] = { 0.1f, 0.1f, 0.1f, 0.1f }; GLfloat ambientLight[] = { 0.0f, 0.0f, 0.0f, 0.0f }; @@ -1995,6 +1995,34 @@ addScreen (CompDisplay *display, glxExtensions = glXQueryExtensionsString (dpy, screenNum); if (!strstr (glxExtensions, "GLX_EXT_texture_from_pixmap")) { + /* try again with indirect rendering */ + if (!indirectRendering) + { + char **copy; + + copy = (char **)malloc ((programArgc + 2) * sizeof (char *)); + for (i = 0; i < programArgc; i++) + { + copy[i] = strdup (programArgv[i]); + } + copy[i++] = "--indirect-rendering"; + copy[i] = NULL; + execvp (programName, copy); + + /* if we made it here execvp failed */ + for (i = 0; copy[i] != NULL; i++) + { + free (copy[i]); + } + free (copy); + + compLogMessage ("core", CompLogLevelFatal, + "Failed to launch with --indirect-rendering"); + XFree (visinfo); + + return FALSE; + } + compLogMessage ("core", CompLogLevelFatal, "GLX_EXT_texture_from_pixmap is missing"); XFree (visinfo); @@ -2080,6 +2108,19 @@ addScreen (CompDisplay *display, return FALSE; } + if (getenv ("SKIP_CHECKS") != NULL) + { + glRenderer = (const char *) glGetString (GL_RENDERER); + if (glRenderer != NULL && + (strcmp (glRenderer, "Software Rasterizer") == 0 || + strcmp (glRenderer, "Mesa X11") == 0)) + { + compLogMessage ("core", CompLogLevelFatal, + "Software rendering detected."); + return FALSE; + } + } + s->textureNonPowerOfTwo = 0; if (strstr (glExtensions, "GL_ARB_texture_non_power_of_two")) s->textureNonPowerOfTwo = 1; --- a/src/texture.c +++ b/src/texture.c @@ -244,13 +244,21 @@ bindPixmapToTexture (CompScreen *screen CompFBConfig *config = &screen->glxPixmapFBConfigs[depth]; int attribs[7], i = 0; + if (getenv ("SKIP_CHECKS") != NULL && (width > screen->maxTextureSize || height > screen->maxTextureSize)) + { + compLogMessage ("core", CompLogLevelWarn, + "Exceeded max texture size"); + + launchFallbackWM (); + } + if (!config->fbConfig) { compLogMessage ("core", CompLogLevelWarn, "No GLXFBConfig for depth %d", depth); - return FALSE; + launchFallbackWM (); } attribs[i++] = GLX_TEXTURE_FORMAT_EXT; @@ -295,7 +303,7 @@ bindPixmapToTexture (CompScreen *screen compLogMessage ("core", CompLogLevelWarn, "glXCreatePixmap failed"); - return FALSE; + launchFallbackWM (); } if (!target) @@ -345,7 +353,7 @@ bindPixmapToTexture (CompScreen *screen (*screen->destroyPixmap) (screen->display->display, texture->pixmap); texture->pixmap = None; - return FALSE; + launchFallbackWM (); } if (!texture->name) ++++++ compiz-decorator.sh ++++++ #!/bin/bash # Starts Compiz Decorator depending on the DE # # Copyright (c) 2007 CyberOrg <cyberorg@cyberorg.info> # Copyright (c) 2015 Sorokin Alexei <sor.alexei@meowr.ru> # # Based on compiz-manager script by Kristian Lyngstøl <kristian@bohemians.org> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License. # # Contributions by: crdlb # # Echos the arguments if verbose. verbose() { if [[ "$VERBOSE" == 'yes' ]]; then printf "$*" >&2 fi } COMPIZ_BIN_PATH="/usr/bin" MARCO="$(which marco 2>/dev/null)" XFWM="$(which xfwm 2>/dev/null)" OPENBOX="$(which openbox 2>/dev/null)" ICEWM="$(which icewm 2>/dev/null)" XTERM="$(which xterm 2>/dev/null)" # Create env variables if empty. if [ ! -z "$XDG_CONFIG_DIRS" ]; then XDG_CONFIG_DIRS="/etc/xdg" fi if [ ! -z "$XDG_CONFIG_HOME" ]; then XDG_CONFIG_HOME="$HOME/.config" fi # Set to yes to enable verbose. VERBOSE="yes" DECORATOR="" # Do not leave users without decoration if decorator fails. FALLBACKWM_OPTS=" --replace" if [[ "$XDG_CURRENT_DESKTOP" == 'MATE' ]] && [ ! -z "$MARCO" ]; then FALLBACKWM="$MARCO" elif ( xprop -root _DT_SAVE_MODE | grep ' = \"xfce4\"$' >/dev/null 2>&1 ) && [ ! -z "$XFWM" ]; then FALLBACKWM="$XFWM"; elif [ ! -z "$OPENBOX" ]; then FALLBACKWM="$OPENBOX" elif [ ! -z "$ICEWM" ]; then FALLBACKWM="$ICEWM" else FALLBACKWM="$XTERM" fi # Read configuration from XDG paths. if [ -f "$XDG_CONFIG_DIRS/compiz/compiz-manager" ]; then . "$XDG_CONFIG_DIRS/compiz/compiz-manager" fi if [ -f "$XDG_CONFIG_HOME/compiz/compiz-manager" ]; then . "$XDG_CONFIG_HOME/compiz/compiz-manager" fi # Start a decorator. if [ -x "$COMPIZ_BIN_PATH/emerald" ] && [[ "$USE_EMERALD" == 'true' ]]; then DECORATOR='emerald' elif [[ "$XDG_CURRENT_DESKTOP" == 'MATE' ]] && [ -x "$COMPIZ_BIN_PATH/mate-window-decorator" ]; then DECORATOR='mate-window-decorator' elif [ -x "$COMPIZ_BIN_PATH/gtk-window-decorator" ]; then DECORATOR='gtk-window-decorator' else # Fall back to any decorator that is installed. verbose "Couldn't find a perfect decorator match, trying all decorators...\n" if [ -x "$COMPIZ_BIN_PATH/emerald" ]; then DECORATOR='emerald' elif [ -x "$COMPIZ_BIN_PATH/mate-window-decorator" ]; then DECORATOR='mate-window-decorator' elif [ -x "$COMPIZ_BIN_PATH/gtk-window-decorator" ]; then DECORATOR='gtk-window-decorator' fi fi if [ ! -z "$DECORATOR" ]; then verbose "Starting $DECORATOR\n" exec "$COMPIZ_BIN_PATH/$DECORATOR" "$@" else verbose "Found no decorator to start\n" exec "$FALLBACKWM" "$FALLBACKWM_OPTS" fi ++++++ compiz-default-settings.diff ++++++ --- /var/tmp/diff_new_pack.ZYPZa8/_old 2015-11-26 17:03:58.000000000 +0100 +++ /var/tmp/diff_new_pack.ZYPZa8/_new 2015-11-26 17:03:58.000000000 +0100 @@ -1,7 +1,5 @@ -Index: compiz-0.8.4/metadata/core.xml.in.in -=================================================================== ---- compiz-0.8.4.orig/metadata/core.xml.in.in -+++ compiz-0.8.4/metadata/core.xml.in.in +--- a/metadata/core.xml.in.in ++++ b/metadata/core.xml.in.in @@ -16,7 +16,7 @@ <option name="audible_bell" type="bool"> <_short>Audible Bell</_short> @@ -11,7 +9,7 @@ </option> <option name="ignore_hints_when_maximized" type="bool"> <_short>Ignore Hints When Maximized</_short> -@@ -38,7 +38,7 @@ +@@ -50,7 +50,7 @@ <option name="ping_delay" type="int"> <_short>Ping Delay</_short> <_long>Interval between ping messages</_long> @@ -20,7 +18,7 @@ <min>1000</min> <max>30000</max> </option> -@@ -223,7 +223,7 @@ +@@ -235,7 +235,7 @@ <option name="lighting" type="bool"> <_short>Lighting</_short> <_long>Use diffuse light when screen is transformed</_long> @@ -29,10 +27,8 @@ </option> <option name="detect_refresh_rate" type="bool"> <_short>Detect Refresh Rate</_short> -Index: compiz-0.8.4/metadata/cube.xml.in -=================================================================== ---- compiz-0.8.4.orig/metadata/cube.xml.in -+++ compiz-0.8.4/metadata/cube.xml.in +--- a/metadata/cube.xml.in ++++ b/metadata/cube.xml.in @@ -110,7 +110,7 @@ <type>string</type> <hints>file;image;</hints> @@ -80,7 +76,7 @@ <option name="active_opacity" type="float"> <_short>Opacity During Rotation</_short> <_long>Opacity of desktop window during rotation.</_long> -- <default>100.0</default> +- <default>70.0</default> + <default>40.0</default> <min>0.0</min> <max>100.0</max> @@ -94,10 +90,8 @@ </option> </group> </screen> -Index: compiz-0.8.4/metadata/decoration.xml.in -=================================================================== ---- compiz-0.8.4.orig/metadata/decoration.xml.in -+++ compiz-0.8.4/metadata/decoration.xml.in +--- a/metadata/decoration.xml.in ++++ b/metadata/decoration.xml.in @@ -16,7 +16,7 @@ <option name="shadow_radius" type="float"> <_short>Shadow Radius</_short> @@ -115,10 +109,8 @@ </option> <option name="mipmap" type="bool"> <_short>Mipmap</_short> -Index: compiz-0.8.4/metadata/resize.xml.in -=================================================================== ---- compiz-0.8.4.orig/metadata/resize.xml.in -+++ compiz-0.8.4/metadata/resize.xml.in +--- a/metadata/resize.xml.in ++++ b/metadata/resize.xml.in @@ -40,7 +40,7 @@ <option name="mode" type="int"> <_short>Default Resize Mode</_short> @@ -128,9 +120,8 @@ <min>0</min> <max>3</max> <desc> -diff -aur compiz-0.8.8_orig//metadata/scale.xml.in compiz-0.8.8//metadata/scale.xml.in ---- compiz-0.8.8_orig//metadata/scale.xml.in 2010-05-21 13:18:14.000000000 +0200 -+++ compiz-0.8.8//metadata/scale.xml.in 2011-11-10 20:26:18.680000010 +0100 +--- a/metadata/scale.xml.in ++++ b/metadata/scale.xml.in @@ -167,7 +167,7 @@ <_long>Selects where windows are scaled if multiple output devices are used.</_long> <min>0</min> ++++++ compiz.desktop ++++++ [Desktop Entry] Type=Application Name=Compiz Exec=compiz ccp Icon=gtk-decorator NoDisplay=true X-MATE-WMSettingsModule=compiz X-MATE-Autostart-Phase=WindowManager X-MATE-Provides=windowmanager X-MATE-WMName=compiz X-GNOME-Autostart-Phase=WindowManager X-GNOME-Provides=windowmanager X-GNOME-WMName=compiz ++++++ mate-window-decorator.py ++++++ #!/usr/bin/env python3 # # Copyright (c) 2015 Sorokin Alexei <sor.alexei@meowr.ru> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License. # global keyValueList, gwdProcess, gwdProcessOld def which(file): for path in os.environ["PATH"].split(os.pathsep): if os.path.exists(os.path.join(path, file)): return os.path.join(path, file) return None def self_killed(): global gwdProcess gwdProcess.force_exit() def gwd_killed(proc, result): global gwdProcess # Make false alarms impossible to happen. if (proc == gwdProcess) and (proc != gwdProcessOld): # Somebody killed decorator, dying as well… if (proc.get_if_exited()): sys.exit(proc.get_exit_status()) else: sys.exit(1) else: # Killed process is not the last started, why care? return 0 def on_gschema_changed(gsettings, key, gschemaSource, init=False): global keyValueList, gwdProcess, gwdProcessOld # All tracked keys. keyList = ["theme", "button-layout", "titlebar-font", "titlebar-uses-system-font"] # Check all keys at initialisation. if (init or key == ""): keys = keyList else: keys = [key] for key in keys: # Avoid possible crashing by checking that key actually exists. if (key in keyList and key in gschemaSource.list_keys()): keyType = gschemaSource.get_key(key).get_value_type().dup_string() oldValue = keyValueList.get(key) if (keyType == "s"): keyValueList[key] = gsettings.get_string(key) elif (keyType == "b"): keyValueList[key] = gsettings.get_boolean(key) else: print("We got a GSettings key of unexpected type.", file=sys.stderr) keyValueList[key] = None # Why bother restarting decorator if nothing actually changed? if (not init) and (keyValueList.get(key) == oldValue): return 0 else: return 1 gwdProcessString = [which("gtk-window-decorator"), "--opacity", "1", "--active-opacity", "1"] if (keyValueList["theme"] != None) and (keyValueList["theme"] != ""): gwdProcessString.extend(["--marco-theme", keyValueList["theme"]]) if (keyValueList["button-layout"] != None) and (keyValueList["button-layout"] != ""): gwdProcessString.extend(["--button-layout", keyValueList["button-layout"]]) if (keyValueList["titlebar-uses-system-font"] == False) and (keyValueList["titlebar-font"] != None) \ and (keyValueList["titlebar-font"] != ""): gwdProcessString.extend(["--titlebar-font", keyValueList["titlebar-font"]]) # Always at the end as this options can override already set ones. gwdProcessString.extend(sys.argv[1:]) if (not init): if ("--replace" not in gwdProcessString): gwdProcessString.append("--replace") gwdProcessOld = gwdProcess gwdProcess = Gio.Subprocess.new(gwdProcessString, Gio.SubprocessFlags.NONE) gwdProcess.wait_async(None, gwd_killed) import sys, os, atexit from gi.repository import GLib, Gio # Global variables. keyValueList = {} gwdProcess = None gwdProcessOld = None if (which("gtk-window-decorator") is None): print("gtk-window-decorator was not found, exiting...", file=sys.stderr) sys.exit(1) gschema="" gsettings = None # Looking up for gschema, GNOME's or Marco's. if ("org.gnome.desktop.wm.preferences" in Gio.Settings.list_schemas()): gschema = "org.gnome.desktop.wm.preferences" if (os.environ["XDG_CURRENT_DESKTOP"] == "MATE" or gschema is Null) and \ ("org.mate.Marco.general" in Gio.Settings.list_schemas()): gschema = "org.mate.Marco.general" if (gschema != ""): gsettings = Gio.Settings.new(gschema) if (gsettings is None): print("No decoration theme was found, falling back to plain gtk-window-decorator.", file=sys.stderr) os.execv(which("gtk-window-decorator"), sys.argv[:]) gschemaSource = Gio.SettingsSchemaSource.get_default().lookup(gschema, False) # Poking on_gschema_changed() to start gwd. on_gschema_changed(gsettings, None, gschemaSource, True) # Kill decorator at exit. atexit.register(self_killed) # Checking for gschemas changes. gsettings.connect("changed", on_gschema_changed, gschemaSource) # Endless event loop. GLib.MainLoop().run()