歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 11.04下Emerald不能用的問題解決

Ubuntu 11.04下Emerald不能用的問題解決

日期:2017/2/28 16:16:18   编辑:Linux教程

先吐槽下,這次更新時絕對是這麼多年來最差的一次,Ubuntu 11.04下N卡8400驅動居然用自帶的閉源受限驅動無效,還有各種不爽不說了。

相信用emerald的TX都會發現按F2後emerald --replace會導致標題欄消失。這次還是emerald不兼容compiz9.X造成的。下面說下解決方法:

第一步:准備一些編譯的基礎包,intltool貌似可以省略

sudo apt-get install git intltool libtool
sudo apt-get build-dep emerald
git clone git://anongit.compiz.org/fusion/decorators/emerald
cd emerald
git checkout -b compiz++ origin/compiz++

第二步:准備一個補丁文檔:vi emeraldfix.txt

其內容可以參看最下面論壇或者我搬來如下:


diff -ru emerald/src/main.c emerald-fixed/src/main.c

--- emerald/src/main.c2011-03-07 22:38:32.865582662 -0500

+++ emerald-fixed/src/main.c2011-03-07 22:41:16.000000000 -0500

@@ -505,7 +505,7 @@

maxextents = extents;

decor_quads_to_property(data, GDK_PIXMAP_XID(d->pixmap),

- &extents, &maxextents, 0, 0, quads, nQuad);

+ &extents, &extents, &maxextents, &maxextents, 0, 0, quads, nQuad);

gdk_error_trap_push();

XChangeProperty(xdisplay, d->prop_xid,

@@ -1937,7 +1937,7 @@

nQuad = set_switcher_quads(quads, d->width, d->height, ws);

decor_quads_to_property(data, GDK_PIXMAP_XID(d->pixmap),

- &extents, &extents, 0, 0, quads, nQuad);

+ &extents, &extents, &extents, &extents, 0, 0, quads, nQuad);

style = gtk_widget_get_style (style_window);

@@ -2364,7 +2364,7 @@

nQuad = set_shadow_quads(quads, width, height, ws);

decor_quads_to_property(data, GDK_PIXMAP_XID(ws->shadow_pixmap),

-&ws->shadow_extents, &ws->shadow_extents, 0, 0,

+&ws->shadow_extents, &ws->shadow_extents, &ws->shadow_extents, &ws->shadow_extents, 0, 0,

quads, nQuad);

XChangeProperty(xdisplay, xroot,

@@ -2424,7 +2424,7 @@

(*d.draw) (&d);

decor_quads_to_property(data, GDK_PIXMAP_XID(d.p_inactive),

-&extents, &extents, 0, 0, quads, nQuad);

+&extents, &extents, &extents, &extents, 0, 0, quads, nQuad);

XChangeProperty(xdisplay, xroot,

normalAtom,

@@ -2433,7 +2433,7 @@

BASE_PROP_SIZE + QUAD_PROP_SIZE * nQuad);

decor_quads_to_property(data, GDK_PIXMAP_XID(d.p_active),

-&extents, &extents, 0, 0, quads, nQuad);

+&extents, &extents, &extents, &extents, 0, 0, quads, nQuad);

XChangeProperty(xdisplay, xroot,

activeAtom,

patch -p1 < emeraldfix.txt #打補丁,我的提示某些行出錯,不過也無影響

第三步:編譯階段,前面弄好的話就不會出錯了

./autogen.sh
./configure --prefix=/usr/local
make
sudo make install
sudo ldconfig

ok了,將compiz的窗口裝飾——命令裡改為emerald --replace,以後自動加載

Copyright © Linux教程網 All Rights Reserved