62
62
create mode 100644 unity/unity_window_decorator/src/util.c
63
63
create mode 100644 unity/unity_window_decorator/src/wnck.c
65
Index: compiz-0.9.2.1+glibmainloop4/CMakeLists.txt
65
Index: compiz-0.9.4/CMakeLists.txt
66
66
===================================================================
67
--- compiz-0.9.2.1+glibmainloop4.orig/CMakeLists.txt 2011-01-13 15:38:38.000000000 +0100
68
+++ compiz-0.9.2.1+glibmainloop4/CMakeLists.txt 2011-01-19 16:49:57.746695001 +0100
67
--- compiz-0.9.4.orig/CMakeLists.txt 2011-02-24 17:27:13.000000000 +0800
68
+++ compiz-0.9.4/CMakeLists.txt 2011-02-24 18:43:30.768529107 +0800
69
69
@@ -112,6 +112,7 @@
70
70
add_subdirectory (libdecoration)
71
71
add_subdirectory (gtk)
74
74
add_subdirectory (po)
75
75
add_subdirectory (metadata)
76
76
add_subdirectory (src)
77
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/.gitignore
77
Index: compiz-0.9.4/unity/unity_window_decorator/.gitignore
78
78
===================================================================
79
79
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
80
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/.gitignore 2011-01-19 16:49:57.750695001 +0100
80
+++ compiz-0.9.4/unity/unity_window_decorator/.gitignore 2011-02-24 18:43:30.768529107 +0800
83
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/AUTHORS
83
Index: compiz-0.9.4/unity/unity_window_decorator/AUTHORS
84
84
===================================================================
85
85
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
86
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/AUTHORS 2011-01-19 16:49:57.754695001 +0100
86
+++ compiz-0.9.4/unity/unity_window_decorator/AUTHORS 2011-02-24 18:43:30.788529139 +0800
88
88
+compiz and the standard set of plugins are designed and written by
114
114
+Julian Sikorski <lordzanon@poczta.onet.pl>
115
115
+Quinn Storm <livinglatexkali@gmail.com>
116
116
+Erkin Bahceci <erkinbah@gmail.com>
117
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/CMakeLists.txt
117
Index: compiz-0.9.4/unity/unity_window_decorator/CMakeLists.txt
118
118
===================================================================
119
119
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
120
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/CMakeLists.txt 2011-01-19 16:49:57.754695001 +0100
120
+++ compiz-0.9.4/unity/unity_window_decorator/CMakeLists.txt 2011-02-24 18:43:30.818529179 +0800
122
122
+project (unity-window-decorator)
157
157
+compiz_package_generation ("Compiz Unity Window Decorator")
160
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/COPYING
160
Index: compiz-0.9.4/unity/unity_window_decorator/COPYING
161
161
===================================================================
162
162
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
163
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/COPYING 2011-01-19 16:49:57.754695001 +0100
163
+++ compiz-0.9.4/unity/unity_window_decorator/COPYING 2011-02-24 18:43:30.818529179 +0800
165
165
+Most of the code is MIT licensed, some code is instead licensed
166
166
+under the LGPL and some under the GPL. Each source code file
170
170
+For More information see COPYING.GPL, COPYING.LGPL and COPYING.MIT.
171
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/COPYING.GPL
171
Index: compiz-0.9.4/unity/unity_window_decorator/COPYING.GPL
172
172
===================================================================
173
173
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
174
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/COPYING.GPL 2011-01-19 16:49:57.754695001 +0100
174
+++ compiz-0.9.4/unity/unity_window_decorator/COPYING.GPL 2011-02-24 18:43:30.818529179 +0800
175
175
@@ -0,0 +1,340 @@
176
176
+ GNU GENERAL PUBLIC LICENSE
177
177
+ Version 2, June 1991
513
513
+consider it more useful to permit linking proprietary applications with the
514
514
+library. If this is what you want to do, use the GNU Library General
515
515
+Public License instead of this License.
516
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/INSTALL
516
Index: compiz-0.9.4/unity/unity_window_decorator/INSTALL
517
517
===================================================================
518
518
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
519
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/INSTALL 2011-01-19 16:49:57.754695001 +0100
519
+++ compiz-0.9.4/unity/unity_window_decorator/INSTALL 2011-02-24 18:43:30.828529191 +0800
521
521
+compiz uses libstartup-notification which is available at
522
522
+ftp://ftp.gnome.org/pub/GNOME/sources/startup-notification/
535
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/README
535
Index: compiz-0.9.4/unity/unity_window_decorator/README
536
536
===================================================================
537
537
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
538
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/README 2011-01-19 16:49:57.758695001 +0100
538
+++ compiz-0.9.4/unity/unity_window_decorator/README 2011-02-24 18:43:30.828529191 +0800
540
540
+compiz - OpenGL window and compositing manager
547
547
+davidr@novell.com
548
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/CMakeLists.txt
548
Index: compiz-0.9.4/unity/unity_window_decorator/src/CMakeLists.txt
549
549
===================================================================
550
550
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
551
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/CMakeLists.txt 2011-01-19 16:50:35.526695000 +0100
551
+++ compiz-0.9.4/unity/unity_window_decorator/src/CMakeLists.txt 2011-02-24 18:43:30.828529191 +0800
552
552
@@ -0,0 +1,161 @@
553
553
+function (compiz_install_gconf_schema _src _dst)
554
554
+ pkg_check_modules (GCONF gconf-2.0)
714
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/TODO
714
Index: compiz-0.9.4/unity/unity_window_decorator/src/TODO
715
715
===================================================================
716
716
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
717
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/TODO 2011-01-19 16:49:57.758695001 +0100
717
+++ compiz-0.9.4/unity/unity_window_decorator/src/TODO 2011-02-24 18:43:31.000000000 +0800
720
720
+* Plugin interface
722
722
+* Plugin with SVG-based theme support
724
724
+* Plugin that supports old metacity themes
725
\ Pas de fin de ligne ? la fin du fichier.
726
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/actionmenu.c
725
\ No newline at end of file
726
Index: compiz-0.9.4/unity/unity_window_decorator/src/actionmenu.c
727
727
===================================================================
728
728
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
729
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/actionmenu.c 2011-01-19 16:49:57.758695001 +0100
729
+++ compiz-0.9.4/unity/unity_window_decorator/src/actionmenu.c 2011-02-24 18:43:31.000000000 +0800
730
730
@@ -0,0 +1,109 @@
731
731
+#include "gtk-window-decorator.h"
838
838
+ action_menu_mapped = TRUE;
840
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/blurprops.c
840
Index: compiz-0.9.4/unity/unity_window_decorator/src/blurprops.c
841
841
===================================================================
842
842
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
843
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/blurprops.c 2011-01-19 16:49:57.758695001 +0100
843
+++ compiz-0.9.4/unity/unity_window_decorator/src/blurprops.c 2011-02-24 18:43:31.000000000 +0800
845
845
+#include "gtk-window-decorator.h"
910
910
+ gdk_error_trap_pop ();
913
\ Pas de fin de ligne ? la fin du fichier.
914
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/cairo.c
913
\ No newline at end of file
914
Index: compiz-0.9.4/unity/unity_window_decorator/src/cairo.c
915
915
===================================================================
916
916
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
917
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/cairo.c 2011-01-19 16:49:57.766695001 +0100
917
+++ compiz-0.9.4/unity/unity_window_decorator/src/cairo.c 2011-02-24 18:43:31.000000000 +0800
918
918
@@ -0,0 +1,1001 @@
919
919
+#include "gtk-window-decorator.h"
1903
1903
+ TRANSLUCENT_CORNER_SIZE,
1904
1904
+ _max_win_extents.bottom - TRANSLUCENT_CORNER_SIZE,
1905
1905
+ &opt_inactive_shadow,
1906
+ &max_window_active_context,
1906
+ &max_window_inactive_context,
1907
1907
+ draw_border_shape,
1917
1917
+get_shadow (decor_t *d, gint shadow_type)
1920
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/config.h.gtk.in
1920
Index: compiz-0.9.4/unity/unity_window_decorator/src/config.h.gtk.in
1921
1921
===================================================================
1922
1922
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1923
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/config.h.gtk.in 2011-01-19 16:49:57.766695001 +0100
1923
+++ compiz-0.9.4/unity/unity_window_decorator/src/config.h.gtk.in 2011-02-24 18:43:31.000000000 +0800
1924
1924
@@ -0,0 +1,25 @@
1925
1925
+/* Define to 1 if Metacity support is enabled */
1926
1926
+#cmakedefine USE_METACITY 1
1947
1947
+#cmakedefine HAVE_METACITY_2_23_2 1
1949
1949
+#define GETTEXT_PACKAGE "${GETTEXT_PACKAGE}"
1950
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/decorator.c
1950
Index: compiz-0.9.4/unity/unity_window_decorator/src/decorator.c
1951
1951
===================================================================
1952
1952
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
1953
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/decorator.c 2011-01-19 16:49:57.770695001 +0100
1953
+++ compiz-0.9.4/unity/unity_window_decorator/src/decorator.c 2011-02-24 18:43:31.000000000 +0800
1955
1955
+#include "gtk-window-decorator.h"
1957
1957
+static const PangoFontDescription *
2608
2608
+ update_window_decoration_size (win);
2609
2609
+ update_event_windows (win);
2613
+ Window xid = wnck_window_get_xid (win);
2616
+ if (get_window_prop (xid, select_window_atom, &select))
2618
+ /* force size update */
2619
+ d->context = NULL;
2620
+ d->width = d->height = 0;
2621
+ switcher_width = switcher_height = 0;
2623
+ update_switcher_window (win, select);
2704
2689
+ decor_quads_to_property (data, no_border_shadow->pixmap,
2705
2690
+ &_shadow_extents, &_shadow_extents,
2691
+ &_shadow_extents, &_shadow_extents,
2706
2692
+ 0, 0, quads, nQuad);
2708
2694
+ XChangeProperty (xdisplay, xroot,
2784
2770
+ XRenderFreePicture (xdisplay, d.picture);
2772
+ fprintf (stderr, "extents are %i %i %i %i %i\n", extents.left, extents.right, extents.top, extents.bottom);
2786
2774
+ decor_quads_to_property (data, GDK_PIXMAP_XID (d.pixmap),
2787
+ &extents, &extents, 0, 0, quads, nQuad);
2775
+ &extents, &extents, &extents, &extents, 0, 0, quads, nQuad);
2789
2777
+ XChangeProperty (xdisplay, xroot,
2811
2799
+ XRenderFreePicture (xdisplay, d.picture);
2813
2801
+ decor_quads_to_property (data, GDK_PIXMAP_XID (d.pixmap),
2814
+ &extents, &extents, 0, 0, quads, nQuad);
2802
+ &extents, &extents, &extents, &extents, 0, 0, quads, nQuad);
2816
2804
+ XChangeProperty (xdisplay, xroot,
2834
2822
+ gdk_cairo_set_source_pixmap (d->cr, d->buffer_pixmap, 0, 0);
2835
2823
+ cairo_paint (d->cr);
2837
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/decorprops.c
2825
Index: compiz-0.9.4/unity/unity_window_decorator/src/decorprops.c
2838
2826
===================================================================
2839
2827
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2840
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/decorprops.c 2011-01-19 16:49:57.770695001 +0100
2828
+++ compiz-0.9.4/unity/unity_window_decorator/src/decorprops.c 2011-02-24 18:43:31.000000000 +0800
2842
2830
+#include "gtk-window-decorator.h"
2879
2867
+ decor_quads_to_property (data, GDK_PIXMAP_XID (d->pixmap),
2880
+ &extents, &extents,
2868
+ &extents, &extents, &extents, &extents,
2881
2869
+ ICON_SPACE + d->button_width,
2883
2871
+ quads, nQuad);
2953
2941
+ decor_quads_to_property (data, GDK_PIXMAP_XID (d->pixmap),
2954
2942
+ &_switcher_extents, &_switcher_extents,
2943
+ &_switcher_extents, &_switcher_extents,
2955
2944
+ 0, 0, quads, nQuad);
2957
2946
+ style = gtk_widget_get_style (style_window_rgba);
2973
2962
+ gdk_error_trap_pop ();
2976
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/events.c
2965
Index: compiz-0.9.4/unity/unity_window_decorator/src/events.c
2977
2966
===================================================================
2978
2967
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
2979
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/events.c 2011-01-19 16:49:57.774695001 +0100
2968
+++ compiz-0.9.4/unity/unity_window_decorator/src/events.c 2011-02-24 18:43:31.000000000 +0800
2981
2970
+#include "gtk-window-decorator.h"
3836
3825
+ GdkDisplay *gdkdisplay;
3837
3826
+ XEvent *xevent = gdkxevent;
3838
3827
+ gulong xid = 0;
3828
+ Window select = 0;
3840
3830
+ gdkdisplay = gdk_display_get_default ();
3841
3831
+ xdisplay = GDK_DISPLAY_XDISPLAY (gdkdisplay);
3843
3833
+ switch (xevent->type) {
3834
+ case CreateNotify:
3836
+ if (!wnck_window_get (xevent->xcreatewindow.window))
3838
+ GdkWindow *toplevel = gdk_window_foreign_new_for_display (gdkdisplay,
3839
+ xevent->xcreatewindow.window);
3843
+ gdk_window_set_events (toplevel,
3844
+ gdk_window_get_events (toplevel) |
3845
+ GDK_PROPERTY_CHANGE_MASK);
3847
+ /* check if the window is a switcher and update accordingly */
3849
+ if (get_window_prop (xevent->xcreatewindow.window, select_window_atom, &select))
3850
+ update_switcher_window (xevent->xcreatewindow.window, select);
3844
3855
+ case ButtonPress:
3845
3856
+ case ButtonRelease:
3846
3857
+ xid = (gulong)
3868
3879
+ win = wnck_window_get (xid);
3871
+ Window frame, window;
3873
+ if (!get_window_prop (xid, select_window_atom, &window))
3884
+ if (!get_window_prop (xid, select_window_atom, &select))
3875
3886
+ if (get_window_prop (xid, frame_input_window_atom, &frame))
3876
3887
+ add_frame_window (win, frame, FALSE);
3888
3899
+ win = wnck_window_get (xid);
3891
+ Window frame, window;
3893
+ if (!get_window_prop (xid, select_window_atom, &window))
3904
+ if (!get_window_prop (xid, select_window_atom, &select))
3895
3906
+ if (get_window_prop (xid, frame_output_window_atom, &frame))
3896
3907
+ add_frame_window (win, frame, TRUE);
3952
3963
+ else if (xevent->xproperty.atom == select_window_atom)
3956
+ xid = xevent->xproperty.window;
3958
+ win = wnck_window_get (xid);
3967
+ if (get_window_prop (xevent->xproperty.window, select_window_atom, &select))
3968
+ update_switcher_window (xevent->xproperty.window, select);
3970
+ else if (xevent->xproperty.atom == XA_WM_TRANSIENT_FOR)
3972
+ WnckWindow *win = wnck_window_get (xevent->xproperty.window);
3975
+ wnck_window_get_window_type (win) == WNCK_WINDOW_DIALOG)
3963
+ if (get_window_prop (xid, select_window_atom, &select))
3964
+ update_switcher_window (win, select);
3979
+ if (get_window_prop (xevent->xproperty.window, XA_WM_TRANSIENT_FOR, &parent))
3981
+ WnckWindow *p = wnck_window_get (parent);
3982
+ decor_t *d = g_object_get_data (G_OBJECT (p), "decor");
3983
+ decor_t *d_transient = g_object_get_data (G_OBJECT (p), "decor");
3985
+ if (g_slist_find (d->transient_windows, p))
3990
+ d->transient_windows = g_slist_append (d->transient_windows, win);
3991
+ d_transient->transient_parent = p;
3968
3997
+ case DestroyNotify:
3969
3999
+ g_hash_table_remove (frame_table,
3970
4000
+ GINT_TO_POINTER (xevent->xproperty.window));
3972
4004
+ case ClientMessage:
3973
4005
+ if (xevent->xclient.message_type == toolkit_action_atom)
4109
4141
+ return GDK_FILTER_CONTINUE;
4111
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/forcequit.c
4143
Index: compiz-0.9.4/unity/unity_window_decorator/src/forcequit.c
4112
4144
===================================================================
4113
4145
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4114
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/forcequit.c 2011-01-19 16:49:57.774695001 +0100
4146
+++ compiz-0.9.4/unity/unity_window_decorator/src/forcequit.c 2011-02-24 18:43:31.000000000 +0800
4115
4147
@@ -0,0 +1,176 @@
4116
4148
+#include "gtk-window-decorator.h"
4289
4321
+ d->force_quit_dialog = NULL;
4292
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/gdk.c
4324
Index: compiz-0.9.4/unity/unity_window_decorator/src/gdk.c
4293
4325
===================================================================
4294
4326
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4295
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/gdk.c 2011-01-19 16:49:57.774695001 +0100
4327
+++ compiz-0.9.4/unity/unity_window_decorator/src/gdk.c 2011-02-24 18:43:31.000000000 +0800
4296
4328
@@ -0,0 +1,87 @@
4297
4329
+#include "gtk-window-decorator.h"
4381
4413
+ window = gtk_widget_get_window (widget);
4382
4414
+ return gdk_pixmap_new (GDK_DRAWABLE (window), w, h, depth);
4384
\ Pas de fin de ligne ? la fin du fichier.
4385
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/gtk-window-decorator.c
4416
\ No newline at end of file
4417
Index: compiz-0.9.4/unity/unity_window_decorator/src/gtk-window-decorator.c
4386
4418
===================================================================
4387
4419
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4388
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/gtk-window-decorator.c 2011-01-19 16:49:57.778695001 +0100
4420
+++ compiz-0.9.4/unity/unity_window_decorator/src/gtk-window-decorator.c 2011-02-24 18:43:31.000000000 +0800
4391
4423
+ * Copyright © 2006 Novell, Inc.
4582
4615
+ GdkScreen *gdkscreen;
4583
4616
+ WnckScreen *screen;
4584
4617
+ gint i, j, status;
4618
+ unsigned int nchildren;
4619
+ Window root_ret, parent_ret;
4620
+ Window *children = NULL;
4585
4621
+ gboolean replace = FALSE;
4587
4623
+#ifdef USE_METACITY
4779
4815
+ if (!minimal)
4817
+ GdkWindow *root = gdk_window_foreign_new_for_display (gdkdisplay,
4818
+ gdk_x11_get_default_root_xwindow ());
4781
4820
+ gdk_window_add_filter (NULL,
4782
4821
+ event_filter_func,
4824
+ XQueryTree (xdisplay, gdk_x11_get_default_root_xwindow (),
4825
+ &root_ret, &parent_ret, &children, &nchildren);
4827
+ for (i = 0; i < nchildren; i++)
4829
+ GdkWindow *toplevel = gdk_window_foreign_new_for_display (gdkdisplay,
4832
+ /* Need property notify on all windows */
4834
+ gdk_window_set_events (toplevel,
4835
+ gdk_window_get_events (toplevel) |
4836
+ GDK_PROPERTY_CHANGE_MASK);
4839
+ /* Need MapNotify on new windows */
4840
+ gdk_window_set_events (root, gdk_window_get_events (root) |
4841
+ GDK_STRUCTURE_MASK |
4842
+ GDK_PROPERTY_CHANGE_MASK |
4843
+ GDK_VISIBILITY_NOTIFY_MASK |
4844
+ GDK_SUBSTRUCTURE_MASK);
4785
4846
+ connect_screen (screen);
4804
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/gtk-window-decorator.h
4865
Index: compiz-0.9.4/unity/unity_window_decorator/src/gtk-window-decorator.h
4805
4866
===================================================================
4806
4867
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4807
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/gtk-window-decorator.h 2011-01-19 16:49:57.778695001 +0100
4868
+++ compiz-0.9.4/unity/unity_window_decorator/src/gtk-window-decorator.h 2011-02-24 18:43:31.000000000 +0800
4809
4870
+#ifndef _GTK_WINDOW_DECORATOR_H
4810
4871
+#define _GTK_WINDOW_DECORATOR_H
4811
4872
+#ifdef HAVE_CONFIG_H
5203
5265
+ WnckWindowActions actions;
5204
5266
+ XID prop_xid;
5205
5267
+ GtkWidget *force_quit_dialog;
5268
+ GSList *transient_windows;
5269
+ WnckWindow *transient_parent;
5206
5270
+ Bool created;
5207
5271
+ void (*draw) (struct _decor *d);
5269
5333
+extern gint switcher_width;
5270
5334
+extern gint switcher_height;
5271
5335
+extern Window switcher_selected_window;
5336
+extern decor_t *switcher_window;
5273
5338
+extern XRenderPictFormat *xformat_rgba;
5274
5339
+extern XRenderPictFormat *xformat_rgb;
5558
5624
+draw_switcher_decoration (decor_t *d);
5561
+update_switcher_window (WnckWindow *win,
5627
+update_switcher_window (Window popup,
5562
5628
+ Window selected);
5631
+switcher_window_opened (Window popup, Window selected);
5634
+switcher_window_closed ();
5564
5636
+/* events.c */
5775
5847
+init_settings (WnckScreen *screen);
5778
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/gwd.schemas.in
5850
Index: compiz-0.9.4/unity/unity_window_decorator/src/gwd.schemas.in
5779
5851
===================================================================
5780
5852
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
5781
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/gwd.schemas.in 2011-01-19 16:49:57.778695001 +0100
5853
+++ compiz-0.9.4/unity/unity_window_decorator/src/gwd.schemas.in 2011-02-24 18:43:31.000000000 +0800
5782
5854
@@ -0,0 +1,81 @@
5783
5855
+<gconfschemafile>
5862
5934
+ </schemalist>
5863
5935
+</gconfschemafile>
5864
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/metacity.c
5936
Index: compiz-0.9.4/unity/unity_window_decorator/src/metacity.c
5865
5937
===================================================================
5866
5938
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
5867
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/metacity.c 2011-01-19 16:49:57.782695001 +0100
5939
+++ compiz-0.9.4/unity/unity_window_decorator/src/metacity.c 2011-02-24 18:43:31.000000000 +0800
5869
5941
+#include "gtk-window-decorator.h"
5871
5943
+#ifdef USE_METACITY
5891
5963
+ Display *xdisplay =
5892
5964
+ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
5894
+ decor_extents_t extents, max_extents;
5966
+ decor_extents_t extents, max_extents, frame_extents, frame_max_extents;
5895
5967
+ decor_quad_t quads[N_QUADS_MAX];
5896
5968
+ gint w, lh, rh;
5897
5969
+ gint top_stretch_offset;
5929
6001
+ top_stretch_offset,
5930
6002
+ bottom_stretch_offset);
5932
+ extents = _win_extents;
5933
+ max_extents = _max_win_extents;
6004
+ extents = frame_extents = _win_extents;
6005
+ max_extents = frame_max_extents = _max_win_extents;
5935
6007
+ /* Add the invisible grab area padding, but only for
5936
6008
+ * pixmap type decorations */
5945
6017
+ if (!d->frame_window && invisible_grab_area_properties)
5947
+ extents.left += invisible_grab_area_properties->left;
5948
+ extents.right += invisible_grab_area_properties->right;
5949
+ extents.bottom += invisible_grab_area_properties->bottom;
6019
+ frame_extents.left += invisible_grab_area_properties->left;
6020
+ frame_extents.right += invisible_grab_area_properties->right;
6021
+ frame_extents.bottom += invisible_grab_area_properties->bottom;
5952
6024
+ extents.top += titlebar_height;
6025
+ frame_extents.top += titlebar_height;
5953
6026
+ max_extents.top += max_titlebar_height;
6027
+ frame_max_extents.top += max_titlebar_height;
5955
6029
+ if (d->frame_window)
5956
6030
+ decor_gen_window_property (data, &extents, &max_extents, 20, 20);
5958
6032
+ decor_quads_to_property (data, GDK_PIXMAP_XID (d->pixmap),
5959
+ &extents, &max_extents,
6033
+ &frame_extents, &extents, &frame_max_extents, &max_extents,
5960
6034
+ ICON_SPACE + d->button_width,
5962
6036
+ quads, nQuad);
6351
6425
+ if (d->active)
6352
6426
+ *flags |= (MetaFrameFlags ) META_FRAME_HAS_FOCUS;
6427
+ else if (g_slist_length (d->transient_windows) > 1)
6429
+ GSList *transient_windows = d->transient_windows;
6431
+ for (; transient_windows;
6432
+ transient_windows = transient_windows->next)
6434
+ if (!transient_windows->data)
6437
+ decor_t *d_transient = g_object_get_data (transient_windows->data, "decor");
6441
+ if (d_transient->active)
6443
+ *flags |= (MetaFrameFlags ) META_FRAME_HAS_FOCUS;
6354
6450
+ if ((d->state & META_MAXIMIZED) == META_MAXIMIZED)
6355
6451
+ *flags |= (MetaFrameFlags ) META_FRAME_MAXIMIZED;
7747
7844
+ TRANSLUCENT_CORNER_SIZE,
7748
7845
+ _max_win_extents.bottom - TRANSLUCENT_CORNER_SIZE,
7750
+ &max_window_active_context,
7847
+ &max_window_inactive_context,
7751
7848
+ draw_border_shape,
7767
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/settings.c
7864
Index: compiz-0.9.4/unity/unity_window_decorator/src/settings.c
7768
7865
===================================================================
7769
7866
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
7770
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/settings.c 2011-01-19 16:49:57.782695001 +0100
7867
+++ compiz-0.9.4/unity/unity_window_decorator/src/settings.c 2011-02-24 18:43:31.000000000 +0800
7771
7868
@@ -0,0 +1,564 @@
7772
7869
+#include "gtk-window-decorator.h"
8336
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/style.c
8433
Index: compiz-0.9.4/unity/unity_window_decorator/src/style.c
8337
8434
===================================================================
8338
8435
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
8339
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/style.c 2011-01-19 16:49:57.782695001 +0100
8436
+++ compiz-0.9.4/unity/unity_window_decorator/src/style.c 2011-02-24 18:43:31.000000000 +0800
8340
8437
@@ -0,0 +1,42 @@
8341
8438
+#include "gtk-window-decorator.h"
8381
8478
+ decorations_changed (screen);
8383
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/switcher.c
8480
Index: compiz-0.9.4/unity/unity_window_decorator/src/switcher.c
8384
8481
===================================================================
8385
8482
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
8386
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/switcher.c 2011-01-19 16:49:57.782695001 +0100
8483
+++ compiz-0.9.4/unity/unity_window_decorator/src/switcher.c 2011-02-24 18:43:31.000000000 +0800
8388
8485
+#include "gtk-window-decorator.h"
8644
8741
+ draw_switcher_foreground (d);
8745
+switcher_window_closed ()
8747
+ g_free (switcher_window);
8748
+ switcher_window = NULL;
8751
+/* Switcher is override-redirect now, we need to track
8752
+ * it separately */
8754
+switcher_window_opened (Window popup, Window window)
8758
+ d = switcher_window = calloc (1, sizeof (decor_t));
8648
+update_switcher_window (WnckWindow *win,
8766
+update_switcher_window (Window popup,
8649
8767
+ Window selected)
8651
+ decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
8769
+ decor_t *d = switcher_window;
8652
8770
+ GdkPixmap *pixmap, *buffer_pixmap = NULL;
8653
+ gint height, width = 0;
8771
+ unsigned int height, width = 0, border, depth;
8773
+ Window root_return;
8654
8774
+ WnckWindow *selected_win;
8655
8775
+ Display *xdisplay;
8656
8776
+ XRenderPictFormat *format;
8779
+ d = switcher_window_opened (popup, selected);
8658
8781
+ xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
8660
+ wnck_window_get_client_window_geometry (win, NULL, NULL, &width, NULL);
8783
+ /* Thats a round-trip */
8784
+ XGetGeometry (gdk_x11_get_default_xdisplay (), popup, &root_return,
8785
+ &x, &y, &width, &height, &border, &depth);
8662
8787
+ decor_get_default_layout (&switcher_context, width, 1, &d->border_layout);
8806
8931
+ d->width = width;
8807
8932
+ d->height = height;
8809
+ d->prop_xid = wnck_window_get_xid (win);
8934
+ d->prop_xid = popup;
8811
8936
+ queue_decor_draw (d);
8815
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/util.c
8940
Index: compiz-0.9.4/unity/unity_window_decorator/src/util.c
8816
8941
===================================================================
8817
8942
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
8818
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/util.c 2011-01-19 16:49:57.786695001 +0100
8943
+++ compiz-0.9.4/unity/unity_window_decorator/src/util.c 2011-02-24 18:43:31.000000000 +0800
8819
8944
@@ -0,0 +1,278 @@
8820
8945
+#include "gtk-window-decorator.h"
9098
Index: compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/wnck.c
9223
Index: compiz-0.9.4/unity/unity_window_decorator/src/wnck.c
9099
9224
===================================================================
9100
9225
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
9101
+++ compiz-0.9.2.1+glibmainloop4/unity/unity_window_decorator/src/wnck.c 2011-01-19 16:49:57.786695001 +0100
9226
+++ compiz-0.9.4/unity/unity_window_decorator/src/wnck.c 2011-02-24 18:43:31.000000000 +0800
9103
9228
+#include "gtk-window-decorator.h"
9217
9345
+ update_window_decoration (WNCK_WINDOW (windows->data));
9218
9346
+ windows = windows->next;
9349
+ /* Update switcher window */
9351
+ if (switcher_window &&
9352
+ get_window_prop (switcher_window->prop_xid,
9353
+ select_window_atom, &select))
9355
+ decor_t *d = switcher_window;
9356
+ /* force size update */
9357
+ d->context = NULL;
9358
+ d->width = d->height = 0;
9359
+ switcher_width = switcher_height = 0;
9361
+ update_switcher_window (d->prop_xid, select);
9540
9683
+ draw_list = g_slist_remove (draw_list, d);
9544
9687
+connect_window (WnckWindow *win)
9546
9689
+ g_signal_connect_object (win, "name_changed",
9619
+ update_window_decoration_size (d->win);
9761
+ /* We need to update the decoration size here
9762
+ * since the shadow size might have changed and
9763
+ * in that case the decoration will be redrawn,
9764
+ * however if the shadow size doesn't change
9765
+ * then we need to redraw the decoration anyways
9766
+ * since the image would have changed */
9767
+ if (!update_window_decoration_size (d->win))
9768
+ queue_decor_draw (d);
9770
+ /* Also update any parents of this window
9771
+ * since they won't get a notification here
9773
+ if (d->transient_parent)
9775
+ decor_t *d_parent = g_object_get_data (d->transient_parent, "decor");
9776
+ queue_decor_draw (d_parent);
9627
9786
+ if (d && d->pixmap)
9629
9788
+ d->active = wnck_window_is_active (win);
9630
+ queue_decor_draw (d);
9633
+ if ((d->state & META_MAXIMIZED) == META_MAXIMIZED)
9635
+ if (!d->frame_window)
9639
+ d->context = &max_window_active_context;
9640
+ d->shadow = max_border_active_shadow;
9644
+ d->context = &max_window_inactive_context;
9645
+ d->shadow = max_border_inactive_shadow;
9650
+ d->shadow = max_border_no_shadow;
9655
+ if (!d->frame_window)
9659
+ d->context = &window_active_context;
9660
+ d->shadow = border_active_shadow;
9664
+ d->context = &window_inactive_context;
9665
+ d->shadow = border_inactive_shadow;
9670
+ d->shadow = border_no_shadow;
9674
+ update_window_decoration_size (d->win);
9790
+ if ((d->state & META_MAXIMIZED) == META_MAXIMIZED)
9792
+ if (!d->frame_window)
9796
+ d->context = &max_window_active_context;
9797
+ d->shadow = max_border_active_shadow;
9801
+ d->context = &max_window_inactive_context;
9802
+ d->shadow = max_border_inactive_shadow;
9807
+ d->shadow = max_border_no_shadow;
9812
+ if (!d->frame_window)
9816
+ d->context = &window_active_context;
9817
+ d->shadow = border_active_shadow;
9821
+ d->context = &window_inactive_context;
9822
+ d->shadow = border_inactive_shadow;
9827
+ d->shadow = border_no_shadow;
9831
+ /* We need to update the decoration size here
9832
+ * since the shadow size might have changed and
9833
+ * in that case the decoration will be redrawn,
9834
+ * however if the shadow size doesn't change
9835
+ * then we need to redraw the decoration anyways
9836
+ * since the image would have changed */
9837
+ if (!update_window_decoration_size (d->win))
9838
+ queue_decor_draw (d);
9840
+ /* Also update any parents of this window
9841
+ * since they won't get a notification here
9843
+ if (d->transient_parent)
9845
+ decor_t *d_parent = g_object_get_data (d->transient_parent, "decor");
9846
+ queue_decor_draw (d_parent);
9732
9907
+ xid = wnck_window_get_xid (win);
9734
+ if (get_window_prop (xid, select_window_atom, &window))
9736
+ d->prop_xid = wnck_window_get_xid (win);
9737
+ update_switcher_window (win, window);
9739
+ else if (get_window_prop (xid, frame_input_window_atom, &window))
9909
+ if (get_window_prop (xid, frame_input_window_atom, &window))
9741
9911
+ add_frame_window (win, window, FALSE);
9745
9915
+ add_frame_window (win, window, TRUE);
9918
+ if (wnck_window_get_window_type (win) == WNCK_WINDOW_DIALOG)
9922
+ if (get_window_prop (xid, XA_WM_TRANSIENT_FOR, &parent))
9924
+ WnckWindow *p = wnck_window_get (parent);
9925
+ decor_t *d = g_object_get_data (G_OBJECT (p), "decor");
9926
+ decor_t *d_transient = g_object_get_data (G_OBJECT (win), "decor");
9930
+ d->transient_windows = g_slist_append (d->transient_windows, win);
9931
+ d_transient->transient_parent = p;
9753
9941
+ Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
9754
9942
+ decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
9943
+ WnckWindow *parent = d->transient_parent;
9947
+ decor_t *d_parent = g_object_get_data (G_OBJECT (parent), "decor");
9949
+ d_parent->transient_windows = g_slist_remove (d_parent->transient_windows, win);
9756
9952
+ remove_frame_window (win);