[oi-dev] DIFF adding to MATE Compiz Special Effects to "Appearance Preferences > Visual Effects" tab used in the old Gnome2

Мартин Бохниг opensxce at mail.ru
Sun Aug 28 18:55:16 UTC 2016


Dear Hipster core-contributor team (==friends),

as discussed via OFFlist multicast emails over the past weeks, here also for the public records again:

BIG CONGRATS for your phantastic distro work, most recently your incorporation of MATE as dedicated Gnome2-successor.
I won't lose more words on that for now, although Hipster (people such as Alexander Pyhalov and Ken Mays, but many more) certainly deserves them for keeping the OpenSolaris spirit alive and providing the best OpenSolaris distro technically speaking of all times.

Here only a minor diff fixing an ironical dilemma:

Until now OpenSolaris/OpenIndiana/Hipster always had and used to have the nice convenient and visible-to-newcomers 
old “Appearance Preferences > Visual Effects” tab used in the old Gnome2:

https://ubuntu-mate.community/t/the-old-appearance-preferences-visual-effects-tab-used-in-the-old-gnome2/6907
https://ubuntu-mate.community/uploads/default/optimized/2X/b/bb052024455412fc560370cd562d9b09a44a84af_1_595x500.png

..... yet never had DRM(/KMS) on newer past 2010 manufactured Intel GPU's, so all the functionality as nicely as it was presented in the control panel frontend, only worked on very old Intel GPU's or on NVidia via their commercial closed binary-only drivers.

Now that Hipster finally might use my humble DRM/KMS diffs (tnx!) it has switched to Mate, and there I wondered why there is no such 

compiz special effects

https://www.google.de/#q=mate+compiz+special+effects


Mate control panel option anymore.
That's of course funny, given that we now finally do have DRM/KMS on Intel (8xx/9xx/Sandy/Ivy/Haswell/some Atoms)!


Hence I spent one hour to fix this problem and found out the following:

In gnome2 responsible for this useful stuff was the following Sun-diff:

https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/desktop/gnome2/gnome-control-center/patches/control-center-03-compiz-integration.patch

Now it is clear why we didn't see that in Mate, because this diff wasn't merged over so far.

I did that and here is my new diff's diff against the old diff:


/code/MATE/oi-userland-oi-hipster/components/desktop$ gdiff -Nub gnome2/gnome-control-center/patches/control-center-03-compiz-integration.patch mate/mate-control-center/patches/04-compiz-integration.patch
--- gnome2/gnome-control-center/patches/control-center-03-compiz-integration.patch    2016-08-27 23:44:14.000000000 +0000
+++ mate/mate-control-center/patches/04-compiz-integration.patch    2016-08-28 19:47:19.687985251 +0000
@@ -1,7 +1,7 @@
-diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' gnome-control-center-2.28.0/capplets/appearance/Makefile.am ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/Makefile.am
---- gnome-control-center-2.28.0/capplets/appearance/Makefile.am    2009-07-16 16:33:13.000000000 +0200
-+++ ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/Makefile.am    2009-10-16 09:52:28.248513437 +0200
-@@ -9,6 +9,8 @@ gnome_appearance_properties_SOURCES = \
+diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' mate-control-center-1.14.0/capplets/appearance/Makefile.am ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/Makefile.am
+--- mate-control-center-1.14.0/capplets/appearance/Makefile.am    2009-07-16 16:33:13.000000000 +0200
++++ ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/Makefile.am    2009-10-16 09:52:28.248513437 +0200
+@@ -9,6 +9,8 @@ mate_appearance_properties_SOURCES = \
      appearance.h \
      appearance-desktop.c \
      appearance-desktop.h \
@@ -10,9 +10,9 @@
      appearance-font.c \
      appearance-font.h \
      appearance-main.c \
-diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' gnome-control-center-2.28.0/capplets/appearance/appearance-effects.c ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/appearance-effects.c
---- gnome-control-center-2.28.0/capplets/appearance/appearance-effects.c    1970-01-01 01:00:00.000000000 +0100
-+++ ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/appearance-effects.c    2009-10-16 09:52:50.817685824 +0200
+diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' mate-control-center-1.14.0/capplets/appearance/appearance-effects.c ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/appearance-effects.c
+--- mate-control-center-1.14.0/capplets/appearance/appearance-effects.c    1970-01-01 01:00:00.000000000 +0100
++++ ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/appearance-effects.c    2009-10-16 09:52:50.817685824 +0200
 @@ -0,0 +1,1234 @@
 +/*
 + * Copyright (C) 2007 Canonical
@@ -58,7 +58,7 @@
 +    METACITY
 +} WindowManager;
 +
-+#define WINDOW_MANAGER_KEY "/desktop/gnome/session/required_components/windowmanager"
++#define WINDOW_MANAGER_KEY "/desktop/mate/session/required_components/windowmanager"
 +#define COMPIZ_BIN       "compiz"
 +#define METACITY_BIN       "metacity"
 +#define REVERT_COUNT       40
@@ -259,7 +259,7 @@
 +
 +    /* test if it is actually a switcher */
 +    if (!g_ascii_strncasecmp (value,
-+                  "OAFIID:GNOME_WorkspaceSwitcherApplet",
++                  "OAFIID:MATE_WorkspaceSwitcherApplet",
 +                  36))
 +    {
 +        /* assemble new gconf-path for num_rows gconf-key */
@@ -342,7 +342,7 @@
 +
 +    /* test if it is actually a switcher */
 +    if (!g_ascii_strncasecmp (value,
-+                  "OAFIID:GNOME_WorkspaceSwitcherApplet",
++                  "OAFIID:MATE_WorkspaceSwitcherApplet",
 +                  36))
 +    {
 +        /* assemble new gconf-path for applets position gconf-key */
@@ -476,7 +476,7 @@
 +                 NULL);
 +
 +    session_file = g_build_filename (g_get_home_dir (),
-+                     ".gnome2",
++                     ".mate2",
 +                     "session",
 +                     NULL);
 +
@@ -532,7 +532,7 @@
 +}
 +
 +/* get_wm_window() and current_window_manager() are essentially cutted and
-+ * pasted from gnome-wm.c from gnome-control-center. */
++ * pasted from mate-wm.c from mate-control-center. */
 +static Window
 +get_wm_window (void)
 +{
@@ -1248,9 +1248,9 @@
 +        gtk_widget_hide (hbox_custom_effects);
 +}
 +
-diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' gnome-control-center-2.28.0/capplets/appearance/appearance-effects.h ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/appearance-effects.h
---- gnome-control-center-2.28.0/capplets/appearance/appearance-effects.h    1970-01-01 01:00:00.000000000 +0100
-+++ ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/appearance-effects.h    2009-10-16 09:52:28.249534159 +0200
+diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' mate-control-center-1.14.0/capplets/appearance/appearance-effects.h ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/appearance-effects.h
+--- mate-control-center-1.14.0/capplets/appearance/appearance-effects.h    1970-01-01 01:00:00.000000000 +0100
++++ ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/appearance-effects.h    2009-10-16 09:52:28.249534159 +0200
 @@ -0,0 +1,21 @@
 +/*
 + * Copyright (C) 2007 Canonical
@@ -1273,12 +1273,12 @@
 + */
 +
 +void effects_init (AppearanceData *data);
-diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' gnome-control-center-2.28.0/capplets/appearance/appearance.h ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/appearance.h
---- gnome-control-center-2.28.0/capplets/appearance/appearance.h    2009-09-07 13:19:06.000000000 +0200
-+++ ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/appearance.h    2009-10-16 09:52:28.250095799 +0200
-@@ -75,6 +75,12 @@ typedef struct
-   gchar *revert_windowtitle_font;
-   gchar *revert_monospace_font;
+diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' mate-control-center-1.14.0/capplets/appearance/appearance.h ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/appearance.h
+--- mate-control-center-1.14.0/capplets/appearance/appearance.h    2009-09-07 13:19:06.000000000 +0200
++++ ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/appearance.h    2009-10-16 09:52:28.250095799 +0200
+@@ -127,6 +127,12 @@
+     gchar* revert_windowtitle_font;
+     gchar* revert_monospace_font;
  
 +  /* effects */
 +  gboolean compiz_running;
@@ -1287,11 +1287,11 @@
 +  GtkWidget *dialog;
 +
    /* style */
-   GdkPixbuf *gtk_theme_icon;
-   GdkPixbuf *window_theme_icon;
-diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' gnome-control-center-2.28.0/capplets/appearance/data/Makefile.am ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/data/Makefile.am
---- gnome-control-center-2.28.0/capplets/appearance/data/Makefile.am    2009-09-07 13:19:06.000000000 +0200
-+++ ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/data/Makefile.am    2009-10-16 09:52:28.250288191 +0200
+     GdkPixbuf* gtk_theme_icon;
+     GdkPixbuf* window_theme_icon;
+diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' mate-control-center-1.14.0/capplets/appearance/data/Makefile.am ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/data/Makefile.am
+--- mate-control-center-1.14.0/capplets/appearance/data/Makefile.am    2009-09-07 13:19:06.000000000 +0200
++++ ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/data/Makefile.am    2009-10-16 09:52:28.250288191 +0200
 @@ -15,7 +15,11 @@ dist_pixmap_DATA = \
          mouse-cursor-normal.png \
          mouse-cursor-normal-large.png \
@@ -1303,11 +1303,11 @@
 +    visual-effects_none.svg    \
 +    visual-effects_normal.svg
  
- cursorfontdir   = $(datadir)/gnome/cursor-fonts
+ cursorfontdir   = $(datadir)/mate/cursor-fonts
  dist_cursorfont_DATA = \
-diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' gnome-control-center-2.28.0/capplets/appearance/data/appearance.ui ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/data/appearance.ui
---- gnome-control-center-2.28.0/capplets/appearance/data/appearance.ui    2009-09-21 12:44:55.000000000 +0200
-+++ ../SUNWgnome-desktop-prefs-2.28.0.fix/gnome-control-center-2.28.0/capplets/appearance/data/appearance.ui    2009-10-16 09:52:28.252549269 +0200
+diff -Nrup -x '*.orig' -x '*.rej' -x '*.*~' mate-control-center-1.14.0/capplets/appearance/data/appearance.ui ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/data/appearance.ui
+--- mate-control-center-1.14.0/capplets/appearance/data/appearance.ui    2009-09-21 12:44:55.000000000 +0200
++++ ../SUNWmate-desktop-prefs-1.14.0.fix/mate-control-center-1.14.0/capplets/appearance/data/appearance.ui    2009-10-16 09:52:28.252549269 +0200
 @@ -1913,6 +1913,272 @@
                  <property name="tab_fill">False</property>
                </packing>
@@ -1336,7 +1336,7 @@
 +                            <property name="visible">True</property>
 +                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 +                            <property name="xpad">6</property>
-+                            <property name="pixbuf">/usr/share/gnome-control-center/pixmaps/visual-effects_none.svg</property>
++                            <property name="pixbuf">/usr/share/mate-control-center/pixmaps/visual-effects_none.svg</property>
 +                            <property name="icon_size">6</property>
 +                          </object>
 +                        </child>
@@ -1381,7 +1381,7 @@
 +                            <property name="visible">True</property>
 +                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 +                            <property name="xpad">6</property>
-+                            <property name="pixbuf">/usr/share/gnome-control-center/pixmaps/visual-effects_normal.svg</property>
++                            <property name="pixbuf">/usr/share/mate-control-center/pixmaps/visual-effects_normal.svg</property>
 +                            <property name="icon_size">6</property>
 +                          </object>
 +                        </child>
@@ -1427,7 +1427,7 @@
 +                            <property name="visible">True</property>
 +                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 +                            <property name="xpad">6</property>
-+                            <property name="pixbuf">/usr/share/gnome-control-center/pixmaps/visual-effects_extra.svg</property>
++                            <property name="pixbuf">/usr/share/mate-control-center/pixmaps/visual-effects_extra.svg</property>
 +                            <property name="icon_size">6</property>
 +                          </object>
 +                        </child>
@@ -1479,7 +1479,7 @@
 +                                <property name="visible">True</property>
 +                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
 +                                <property name="xpad">6</property>
-+                                <property name="pixbuf">/usr/share/gnome-control-center/pixmaps/visual-effects_custom.svg</property>
++                                <property name="pixbuf">/usr/share/mate-control-center/pixmaps/visual-effects_custom.svg</property>
 +                                <property name="icon_size">6</property>
 +                              </object>
 +                              <packing>
@@ -1593,11 +1593,11 @@
        <action-widget response="-11">help_button</action-widget>
        <action-widget response="-7">close_button</action-widget>
      </action-widgets>
-diff -ruN gnome-control-center-2.29.6.orig/configure.ac gnome-control-center-2.29.6/configure.ac
---- gnome-control-center-2.29.6.orig/configure.ac    2010-02-02 20:43:08.328661566 +0000
-+++ gnome-control-center-2.29.6/configure.ac    2010-02-02 20:43:37.866991531 +0000
+diff -ruN mate-control-center-1.14.0.orig/configure.ac mate-control-center-1.14.0/configure.ac
+--- mate-control-center-1.14.0.orig/configure.ac    2010-02-02 20:43:08.328661566 +0000
++++ mate-control-center-1.14.0/configure.ac    2010-02-02 20:43:37.866991531 +0000
 @@ -174,6 +174,22 @@
- GNOMECC_LIBS="$GNOMECC_LIBS $x_libs"
+ MATECC_LIBS="$MATECC_LIBS $x_libs"
  
  dnl
 +dnl Check for OpenGL support
@@ -1619,14 +1619,14 @@
  dnl Check for XCursor support.  If it exists, then we compile the
  dnl mouse capplet with support for it turned on
  dnl
-diff -ruN gnome-control-center-2.29.6.orig/capplets/appearance/appearance-main.c gnome-control-center-2.29.6/capplets/appearance/appearance-main.c
---- gnome-control-center-2.29.6.orig/capplets/appearance/appearance-main.c    2010-02-02 20:45:20.834726490 +0000
-+++ gnome-control-center-2.29.6/capplets/appearance/appearance-main.c    2010-02-02 20:46:36.657848187 +0000
-@@ -164,6 +164,7 @@
-   desktop_init (data, (const gchar **) wallpaper_files);
+diff -ruN mate-control-center-1.14.0.orig/capplets/appearance/appearance-main.c mate-control-center-1.14.0/capplets/appearance/appearance-main.c
+--- mate-control-center-1.14.0.orig/capplets/appearance/appearance-main.c    2010-02-02 20:45:20.834726490 +0000
++++ mate-control-center-1.14.0/capplets/appearance/appearance-main.c    2010-02-02 20:46:36.657848187 +0000
+@@ -193,6 +193,7 @@
    g_strfreev (wallpaper_files);
    font_init (data);
+   ui_init (data);
 +  effects_init (data);
  
-   /* prepare the main window */
-   w = appearance_capplet_get_widget (data, "appearance_window");
+   /* init support for other window managers */
+   support_init (data);





And the resulting new diff which adds this back to Mate is attached and only needs to be placed to  oi-userland-oi-hipster/components/desktop/mate/mate-control-center/patches/04-compiz-integration.patch


<<04-compiz-integration.patch>>

p.s. My build host's gtk2 is too old, so this is not yet fully tested (please do so).
This attached patch is mostly complete, but I don't rule out that it perhaps needs potential polishing.




-- 
Мартин Бохниг
Die DDR - Meine Heimat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20160828/122965bb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/x-patch
Size: 54188 bytes
Desc: not available
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20160828/122965bb/attachment-0001.bin>


More information about the oi-dev mailing list