Hello community,
here is the log from the commit of package compiz
checked in at Sat Apr 22 01:23:32 CEST 2006.
--------
--- compiz/compiz.changes 2006-04-20 03:44:17.000000000 +0200
+++ STABLE/compiz/compiz.changes 2006-04-21 02:23:08.000000000 +0200
@@ -1,0 +2,9 @@
+Fri Apr 21 02:18:51 CEST 2006 - dreveman@suse.de
+
+- Add window menu binding.
+- Default bindings now the same as metacity. Alt-Button2 for
+ resizing and Alt-Button3 for window menu.
+- Add force quit dialog.
+- Add go-directly-to-cube-face bindings.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ compiz.spec ++++++
--- /var/tmp/diff_new_pack.p4Vwii/_old 2006-04-22 01:23:08.000000000 +0200
+++ /var/tmp/diff_new_pack.p4Vwii/_new 2006-04-22 01:23:08.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package compiz (Version cvs_060420)
+# spec file for package compiz (Version cvs_060421)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -17,8 +17,8 @@
PreReq: %fillup_prereq
Requires: libpng libdrm gconf2 gtk2 gnome-desktop control-center2 libsvg libsvg-cairo libwnck
Autoreqprov: on
-Version: cvs_060420
-Release: 1
+Version: cvs_060421
+Release: 2
Summary: OpenGL window and compositing manager.
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ppc ppc64 ia64
@@ -134,6 +134,12 @@
/etc/opt/gnome/gconf/schemas/compiz.schemas
%changelog -n compiz
+* Fri Apr 21 2006 - dreveman@suse.de
+- Add window menu binding.
+- Default bindings now the same as metacity. Alt-Button2 for
+ resizing and Alt-Button3 for window menu.
+- Add force quit dialog.
+- Add go-directly-to-cube-face bindings.
* Thu Apr 20 2006 - dreveman@suse.de
- Fix infinite loop in gconf plugin.
- A lot of improvements to schema file.
++++++ compiz-0.0.9.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/ChangeLog new/compiz-0.0.9/ChangeLog
--- old/compiz-0.0.9/ChangeLog 2006-04-20 02:58:27.000000000 +0200
+++ new/compiz-0.0.9/ChangeLog 2006-04-21 01:12:00.000000000 +0200
@@ -1,5 +1,42 @@
+2006-04-20 Dan Winship
+
+ * plugins/rotate.c: add 12 go-directly-to-cube-face and 12
+ go-directly-to-cube-face-with-window bindings.
+
+ * src/display.c (compDisplayInitOptions): fix the binding type on
+ WINDOW_MENU.
+
+ * plugins/compiz.schemas: Regen. (lower_window, window_menu,
+ scale_image, images, resize, flip_move, move_window_types, and the
+ new rotate bindings)
+
2006-04-20 David Reveman
+ * src/window.c:
+ * src/event.c (handleEvent):
+ * src/display.c:
+ * include/compiz.h:
+ * gnome/window-decorator/gnome-window-decorator.c: Add force quit
+ dialog.
+
+ * plugins/resize.c: Changed default binding to Button2.
+
+ * src/display.c (LOWER_WINDOW_BUTTON_DEFAULT): Button2 -> 6.
+
+ * gnome/window-decorator/gnome-window-decorator.c:
+ * include/compiz.h:
+ * src/event.c (handleEvent):
+ * src/display.c: Add window menu binding.
+
+ * gnome/window-decorator/gnome-window-decorator.c: Pick up toolkit
+ actions from compiz and send gnome panel actions for "main menu" and
+ "run dialog" actions.
+
+ * src/event.c (handleEvent):
+ * src/screen.c:
+ * include/compiz.h:
+ * src/display.c (addDisplay): panel action -> toolkit action.
+
* src/window.c (getModalTransient): Group transient must not be an
ancestor to the window we've currently found as the window to focus.
(getModalTransient): Check for child modal transient.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/gnome/window-decorator/gnome-window-decorator.c new/compiz-0.0.9/gnome/window-decorator/gnome-window-decorator.c
--- old/compiz-0.0.9/gnome/window-decorator/gnome-window-decorator.c 2006-04-18 13:45:38.000000000 +0200
+++ new/compiz-0.0.9/gnome/window-decorator/gnome-window-decorator.c 2006-04-20 20:49:39.000000000 +0200
@@ -49,6 +49,9 @@
#include
#include
#include
+#include
+#include
+#include
#define GCONF_DIR "/apps/metacity/general"
@@ -658,6 +661,16 @@
static Atom restack_window_atom;
static Atom select_window_atom;
+static Atom toolkit_action_atom;
+static Atom toolkit_action_main_menu_atom;
+static Atom toolkit_action_run_dialog_atom;
+static Atom toolkit_action_window_menu_atom;
+static Atom toolkit_action_force_quit_dialog_atom;
+
+static Atom panel_action_atom;
+static Atom panel_action_main_menu_atom;
+static Atom panel_action_run_dialog_atom;
+
#define C(name) { 0, XC_ ## name }
static struct _cursor {
@@ -720,6 +733,7 @@
WnckWindowState state;
WnckWindowActions actions;
XID prop_xid;
+ GtkWidget *force_quit_dialog;
void (*draw) (struct _decor *d);
} decor_t;
@@ -2810,6 +2824,14 @@
d->icon_pixmap = NULL;
}
+ if (d->force_quit_dialog)
+ {
+ GtkWidget *dialog = d->force_quit_dialog;
+
+ d->force_quit_dialog = NULL;
+ gtk_widget_destroy (dialog);
+ }
+
d->width = 0;
d->height = 0;
@@ -2974,6 +2996,8 @@
d->decorated = FALSE;
+ d->force_quit_dialog = NULL;
+
d->draw = draw_window_decoration;
g_object_set_data (G_OBJECT (win), "decor", d);
@@ -3468,6 +3492,48 @@
}
static void
+action_menu_map (WnckWindow *win,
+ long button,
+ Time time)
+{
+ GdkDisplay *gdkdisplay;
+ GdkScreen *screen;
+
+ gdkdisplay = gdk_display_get_default ();
+ screen = gdk_display_get_default_screen (gdkdisplay);
+
+ if (action_menu)
+ {
+ if (action_menu_mapped)
+ {
+ gtk_widget_destroy (action_menu);
+ action_menu_mapped = FALSE;
+ action_menu = NULL;
+ return;
+ }
+ else
+ gtk_widget_destroy (action_menu);
+ }
+
+ action_menu = wnck_create_window_action_menu (win);
+
+ gtk_menu_set_screen (GTK_MENU (action_menu), screen);
+
+ g_signal_connect_object (G_OBJECT (action_menu), "unmap",
+ G_CALLBACK (action_menu_unmap),
+ 0, 0);
+
+ gtk_widget_show (action_menu);
+ gtk_menu_popup (GTK_MENU (action_menu),
+ NULL, NULL,
+ NULL, NULL,
+ button,
+ time);
+
+ action_menu_mapped = TRUE;
+}
+
+static void
title_event (WnckWindow *win,
XEvent *xevent)
{
@@ -3508,41 +3574,9 @@
}
else if (xevent->xbutton.button == 3)
{
- GdkDisplay *gdkdisplay;
- GdkScreen *screen;
-
- gdkdisplay = gdk_display_get_default ();
- screen = gdk_display_get_default_screen (gdkdisplay);
-
- if (action_menu)
- {
- if (action_menu_mapped)
- {
- gtk_widget_destroy (action_menu);
- action_menu_mapped = FALSE;
- action_menu = NULL;
- return;
- }
- else
- gtk_widget_destroy (action_menu);
- }
-
- action_menu = wnck_create_window_action_menu (win);
-
- gtk_menu_set_screen (GTK_MENU (action_menu), screen);
-
- g_signal_connect_object (G_OBJECT (action_menu), "unmap",
- G_CALLBACK (action_menu_unmap),
- 0, 0);
-
- gtk_widget_show (action_menu);
- gtk_menu_popup (GTK_MENU (action_menu),
- NULL, NULL,
- NULL, NULL,
- xevent->xbutton.button,
- xevent->xbutton.time);
-
- action_menu_mapped = TRUE;
+ action_menu_map (win,
+ xevent->xbutton.button,
+ xevent->xbutton.time);
}
}
@@ -3578,6 +3612,202 @@
move_resize_window (win, WM_MOVERESIZE_SIZE_BOTTOMRIGHT, xevent);
}
+static void
+panel_action (Display *xdisplay,
+ Window root,
+ Atom panel_action,
+ Time event_time)
+{
+ XEvent ev;
+
+ ev.type = ClientMessage;
+ ev.xclient.window = root;
+ ev.xclient.message_type = panel_action_atom;
+ ev.xclient.format = 32;
+ ev.xclient.data.l[0] = panel_action;
+ ev.xclient.data.l[1] = event_time;
+ ev.xclient.data.l[2] = 0;
+ ev.xclient.data.l[3] = 0;
+ ev.xclient.data.l[4] = 0;
+
+ XSendEvent (xdisplay, root, FALSE, StructureNotifyMask, &ev);
+}
+
+static void
+force_quit_dialog_realize (GtkWidget *dialog,
+ void *data)
+{
+ WnckWindow *win = data;
+
+ gdk_error_trap_push ();
+ XSetTransientForHint (gdk_display,
+ GDK_WINDOW_XID (dialog->window),
+ wnck_window_get_xid (win));
+ XSync (gdk_display, FALSE);
+ gdk_error_trap_pop ();
+}
+
+static char *
+get_client_machine (Window xwindow)
+{
+ Atom atom, type;
+ gulong nitems, bytes_after;
+ guchar *str = NULL;
+ int format, result;
+ char *retval;
+
+ atom = XInternAtom (gdk_display, "WM_CLIENT_MACHINE", FALSE);
+
+ gdk_error_trap_push ();
+
+ result = XGetWindowProperty (gdk_display,
+ xwindow, atom,
+ 0, G_MAXLONG,
+ FALSE, XA_STRING, &type, &format, &nitems,
+ &bytes_after, (guchar **) &str);
+
+ gdk_error_trap_pop ();
+
+ if (result != Success)
+ return NULL;
+
+ if (type != XA_STRING)
+ {
+ XFree (str);
+ return NULL;
+ }
+
+ retval = g_strdup (str);
+
+ XFree (str);
+
+ return retval;
+}
+
+static void
+kill_window (WnckWindow *win)
+{
+ WnckApplication *app;
+
+ app = wnck_window_get_application (win);
+ if (app)
+ {
+ gchar buf[257], *client_machine;
+ int pid;
+
+ pid = wnck_application_get_pid (app);
+ client_machine = get_client_machine (wnck_application_get_xid (app));
+
+ if (client_machine && pid > 0)
+ {
+ if (gethostname (buf, sizeof (buf) - 1) == 0)
+ {
+ if (strcmp (buf, client_machine) == 0)
+ kill (pid, 9);
+ }
+ }
+
+ if (client_machine)
+ g_free (client_machine);
+ }
+
+ gdk_error_trap_push ();
+ XKillClient (gdk_display, wnck_window_get_xid (win));
+ XSync (gdk_display, FALSE);
+ gdk_error_trap_pop ();
+}
+
+static void
+force_quit_dialog_response (GtkWidget *dialog,
+ gint response,
+ void *data)
+{
+ WnckWindow *win = data;
+ decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
+
+ if (response == GTK_RESPONSE_ACCEPT)
+ kill_window (win);
+
+ if (d->force_quit_dialog)
+ {
+ d->force_quit_dialog = NULL;
+ gtk_widget_destroy (dialog);
+ }
+}
+
+static void
+show_force_quit_dialog (WnckWindow *win,
+ Time timestamp)
+{
+ decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
+ GtkWidget *dialog;
+ gchar *str, *tmp;
+
+ if (d->force_quit_dialog)
+ return;
+
+ tmp = g_markup_escape_text (wnck_window_get_name (win), -1);
+ str = g_strdup_printf ("The window \"%s\" is not responding.", tmp);
+
+ g_free (tmp);
+
+ dialog = gtk_message_dialog_new (NULL, 0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_NONE,
+ "<b>%s</b>\n\n%s",
+ str,
+ "Forcing this application to "
+ "quit will cause you to lose any "
+ "unsaved changes.");
+ g_free (str);
+
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), "force-quit");
+
+ gtk_label_set_use_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label),
+ TRUE);
+ gtk_label_set_line_wrap (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label),
+ TRUE);
+
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_REJECT,
+ "_Force Quit",
+ GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_REJECT);
+
+ g_signal_connect (G_OBJECT (dialog), "realize",
+ G_CALLBACK (force_quit_dialog_realize),
+ win);
+
+ g_signal_connect (G_OBJECT (dialog), "response",
+ G_CALLBACK (force_quit_dialog_response),
+ win);
+
+ gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+
+ gtk_widget_realize (dialog);
+
+ gdk_x11_window_set_user_time (dialog->window, timestamp);
+
+ gtk_widget_show (dialog);
+
+ d->force_quit_dialog = dialog;
+}
+
+static void
+hide_force_quit_dialog (WnckWindow *win)
+{
+ decor_t *d = g_object_get_data (G_OBJECT (win), "decor");
+
+ if (d->force_quit_dialog)
+ {
+ gtk_widget_destroy (d->force_quit_dialog);
+ d->force_quit_dialog = NULL;
+ }
+}
+
static GdkFilterReturn
event_filter_func (GdkXEvent *gdkxevent,
GdkEvent *event,
@@ -3646,6 +3876,52 @@
case DestroyNotify:
g_hash_table_remove (frame_table,
GINT_TO_POINTER (xevent->xproperty.window));
+ break;
+ case ClientMessage:
+ if (xevent->xclient.message_type == toolkit_action_atom)
+ {
+ long action;
+
+ action = xevent->xclient.data.l[0];
+ if (action == toolkit_action_main_menu_atom)
+ {
+ panel_action (xdisplay, xevent->xclient.window,
+ panel_action_main_menu_atom,
+ xevent->xclient.data.l[1]);
+ }
+ else if (action == toolkit_action_run_dialog_atom)
+ {
+ panel_action (xdisplay, xevent->xclient.window,
+ panel_action_run_dialog_atom,
+ xevent->xclient.data.l[1]);
+ }
+ else if (action == toolkit_action_window_menu_atom)
+ {
+ WnckWindow *win;
+
+ win = wnck_window_get (xevent->xclient.window);
+ if (win)
+ {
+ action_menu_map (win,
+ xevent->xclient.data.l[2],
+ xevent->xclient.data.l[1]);
+ }
+ }
+ else if (action == toolkit_action_force_quit_dialog_atom)
+ {
+ WnckWindow *win;
+
+ win = wnck_window_get (xevent->xclient.window);
+ if (win)
+ {
+ if (xevent->xclient.data.l[2])
+ show_force_quit_dialog (win,
+ xevent->xclient.data.l[1]);
+ else
+ hide_force_quit_dialog (win);
+ }
+ }
+ }
default:
break;
}
@@ -4095,6 +4371,25 @@
select_window_atom = XInternAtom (xdisplay, "_SWITCH_SELECT_WINDOW",
FALSE);
+ toolkit_action_atom =
+ XInternAtom (xdisplay, "_COMPIZ_TOOLKIT_ACTION", FALSE);
+ toolkit_action_main_menu_atom =
+ XInternAtom (xdisplay, "_COMPIZ_TOOLKIT_ACTION_MAIN_MENU", FALSE);
+ toolkit_action_run_dialog_atom =
+ XInternAtom (xdisplay, "_COMPIZ_TOOLKIT_ACTION_RUN_DIALOG", FALSE);
+ toolkit_action_window_menu_atom =
+ XInternAtom (xdisplay, "_COMPIZ_TOOLKIT_ACTION_WINDOW_MENU", FALSE);
+ toolkit_action_force_quit_dialog_atom =
+ XInternAtom (xdisplay, "_COMPIZ_TOOLKIT_ACTION_FORCE_QUIT_DIALOG",
+ FALSE);
+
+ panel_action_atom =
+ XInternAtom (xdisplay, "_GNOME_PANEL_ACTION", FALSE);
+ panel_action_main_menu_atom =
+ XInternAtom (xdisplay, "_GNOME_PANEL_ACTION_MAIN_MENU", FALSE);
+ panel_action_run_dialog_atom =
+ XInternAtom (xdisplay, "_GNOME_PANEL_ACTION_RUN_DIALOG", FALSE);
+
for (i = 0; i < 3; i++)
{
for (j = 0; j < 3; j++)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/include/compiz.h new/compiz-0.0.9/include/compiz.h
--- old/compiz-0.0.9/include/compiz.h 2006-04-19 01:28:22.000000000 +0200
+++ new/compiz-0.0.9/include/compiz.h 2006-04-20 20:38:33.000000000 +0200
@@ -389,7 +389,8 @@
#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT 40
#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 41
#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT 42
-#define COMP_DISPLAY_OPTION_NUM 43
+#define COMP_DISPLAY_OPTION_WINDOW_MENU 43
+#define COMP_DISPLAY_OPTION_NUM 44
typedef CompOption *(*GetDisplayOptionsProc) (CompDisplay *display,
int *count);
@@ -519,9 +520,11 @@
Atom xBackgroundAtom[2];
- Atom panelActionAtom;
- Atom panelActionMainMenuAtom;
- Atom panelActionRunDialogAtom;
+ Atom toolkitActionAtom;
+ Atom toolkitActionMainMenuAtom;
+ Atom toolkitActionRunDialogAtom;
+ Atom toolkitActionWindowMenuAtom;
+ Atom toolkitActionForceQuitDialogAtom;
Atom mwmHintsAtom;
@@ -1342,9 +1345,13 @@
Window root);
void
-panelAction (CompScreen *s,
- Atom panelAction,
- Time eventTime);
+toolkitAction (CompScreen *s,
+ Atom toolkitAction,
+ Time eventTime,
+ Window window,
+ long data0,
+ long data1,
+ long data2);
void
runCommand (CompScreen *s,
@@ -1514,6 +1521,9 @@
int syncHeight;
int syncBorderWidth;
+ Bool closeRequests;
+ Time lastCloseRequestTime;
+
XRectangle *damageRects;
int sizeDamage;
int nDamage;
@@ -1741,7 +1751,8 @@
activateWindow (CompWindow *w);
void
-closeWindow (CompWindow *w);
+closeWindow (CompWindow *w,
+ Time serverTime);
void
getOuterRectOfWindow (CompWindow *w,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/plugins/compiz.schemas new/compiz-0.0.9/plugins/compiz.schemas
--- old/compiz-0.0.9/plugins/compiz.schemas 2006-04-18 16:47:07.000000000 +0200
+++ new/compiz-0.0.9/plugins/compiz.schemas 2006-04-21 01:12:01.000000000 +0200
@@ -475,7 +475,7 @@
<applyto>/apps/compiz/general/allscreens/options/lower_window</applyto>
<owner>compiz</owner>
<type>string</type>
- <default><Alt>Button2</default>
+ <default><Alt>Button6</default>
<locale name="C">
<short>Lower Window</short>
<long>
@@ -610,6 +610,20 @@
</locale>
</schema>
+ <schema>
+ <key>/schemas/apps/compiz/general/allscreens/options/window_menu</key>
+ <applyto>/apps/compiz/general/allscreens/options/window_menu</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default><Alt>Button3</default>
+ <locale name="C">
+ <short>Window Menu</short>
+ <long>
+ Open window menu
+ </long>
+ </locale>
+ </schema>
+
<!-- screen0 options -->
<schema>
@@ -725,16 +739,30 @@
</schema>
<schema>
- <key>/schemas/apps/compiz/plugins/cube/screen0/options/svgs</key>
- <applyto>/apps/compiz/plugins/cube/screen0/options/svgs</applyto>
+ <key>/schemas/apps/compiz/plugins/cube/screen0/options/scale_image</key>
+ <applyto>/apps/compiz/plugins/cube/screen0/options/scale_image</applyto>
+ <owner>compiz</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Scale image</short>
+ <long>
+ Scale images to cover top face of cube
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/cube/screen0/options/images</key>
+ <applyto>/apps/compiz/plugins/cube/screen0/options/images</applyto>
<owner>compiz</owner>
<type>list</type>
string
- <default>[]</default>
+ <default>[novell.png]</default>
<locale name="C">
- <short>SVG files</short>
+ <short>Image files</short>
<long>
- List of SVG files rendered on top face of cube
+ List of PNG and SVG files that should be rendered on top face of cube
</long>
</locale>
</schema>
@@ -956,7 +984,7 @@
<applyto>/apps/compiz/plugins/resize/screen0/options/initiate</applyto>
<owner>compiz</owner>
<type>string</type>
- <default><Alt>Button3</default>
+ <default><Alt>Button2</default>
<locale name="C">
<short>Initiate Window Resize</short>
<long>
@@ -970,7 +998,7 @@
<applyto>/apps/compiz/plugins/resize/screen0/options/terminate</applyto>
<owner>compiz</owner>
<type>string</type>
- <default><Release>Button3</default>
+ <default><Release>Button2</default>
<locale name="C">
<short>Terminate Window Resize</short>
<long>
@@ -1180,7 +1208,7 @@
<applyto>/apps/compiz/plugins/rotate/screen0/options/flip_move</applyto>
<owner>compiz</owner>
<type>bool</type>
- <default>false</default>
+ <default>true</default>
<locale name="C">
<short>Flip Move</short>
<long>
@@ -1190,6 +1218,342 @@
</schema>
<schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_1</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_1</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 1</short>
+ <long>
+ Rotate to face 1
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_2</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_2</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 2</short>
+ <long>
+ Rotate to face 2
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_3</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_3</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 3</short>
+ <long>
+ Rotate to face 3
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_4</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_4</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 4</short>
+ <long>
+ Rotate to face 4
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_5</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_5</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 5</short>
+ <long>
+ Rotate to face 5
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_6</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_6</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 6</short>
+ <long>
+ Rotate to face 6
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_7</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_7</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 7</short>
+ <long>
+ Rotate to face 7
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_8</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_8</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 8</short>
+ <long>
+ Rotate to face 8
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_9</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_9</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 9</short>
+ <long>
+ Rotate to face 9
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_10</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_10</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 10</short>
+ <long>
+ Rotate to face 10
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_11</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_11</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 11</short>
+ <long>
+ Rotate to face 11
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_12</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_12</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 12</short>
+ <long>
+ Rotate to face 12
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_1_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_1_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 1 with Window</short>
+ <long>
+ Rotate to face 1 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_2_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_2_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 2 with Window</short>
+ <long>
+ Rotate to face 2 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_3_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_3_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 3 with Window</short>
+ <long>
+ Rotate to face 3 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_4_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_4_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 4 with Window</short>
+ <long>
+ Rotate to face 4 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_5_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_5_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 5 with Window</short>
+ <long>
+ Rotate to face 5 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_6_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_6_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 6 with Window</short>
+ <long>
+ Rotate to face 6 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_7_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_7_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 7 with Window</short>
+ <long>
+ Rotate to face 7 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_8_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_8_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 8 with Window</short>
+ <long>
+ Rotate to face 8 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_9_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_9_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 9 with Window</short>
+ <long>
+ Rotate to face 9 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_10_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_10_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 10 with Window</short>
+ <long>
+ Rotate to face 10 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_11_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_11_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 11 with Window</short>
+ <long>
+ Rotate to face 11 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/compiz/plugins/rotate/screen0/options/rotate_to_12_window</key>
+ <applyto>/apps/compiz/plugins/rotate/screen0/options/rotate_to_12_window</applyto>
+ <owner>compiz</owner>
+ <type>string</type>
+ <default>Disabled</default>
+ <locale name="C">
+ <short>Rotate To Face 12 with Window</short>
+ <long>
+ Rotate to face 12 and bring active window along
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/compiz/plugins/switcher/screen0/options/initiate</key>
<applyto>/apps/compiz/plugins/switcher/screen0/options/initiate</applyto>
<owner>compiz</owner>
@@ -1733,7 +2097,7 @@
<owner>compiz</owner>
<type>list</type>
string
- <default>[Toolbar,Menu,Utility,Dialog,Normal]</default>
+ <default>[Toolbar,Menu,Utility,Dialog,ModalDialog,Normal]</default>
<locale name="C">
<short>Move Window Types</short>
<long>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/plugins/resize.c new/compiz-0.0.9/plugins/resize.c
--- old/compiz-0.0.9/plugins/resize.c 2006-04-18 13:02:31.000000000 +0200
+++ new/compiz-0.0.9/plugins/resize.c 2006-04-20 16:18:29.000000000 +0200
@@ -36,10 +36,10 @@
#define ResizeLeftMask (1L << 2)
#define ResizeRightMask (1L << 3)
-#define RESIZE_INITIATE_BUTTON_DEFAULT Button3
+#define RESIZE_INITIATE_BUTTON_DEFAULT Button2
#define RESIZE_INITIATE_MODIFIERS_DEFAULT (CompPressMask | CompAltMask)
-#define RESIZE_TERMINATE_BUTTON_DEFAULT Button3
+#define RESIZE_TERMINATE_BUTTON_DEFAULT Button2
#define RESIZE_TERMINATE_MODIFIERS_DEFAULT CompReleaseMask
struct _ResizeKeys {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/plugins/rotate.c new/compiz-0.0.9/plugins/rotate.c
--- old/compiz-0.0.9/plugins/rotate.c 2006-04-18 14:02:06.000000000 +0200
+++ new/compiz-0.0.9/plugins/rotate.c 2006-04-21 01:12:01.000000000 +0200
@@ -113,7 +113,31 @@
#define ROTATE_SCREEN_OPTION_EDGEFLIP 12
#define ROTATE_SCREEN_OPTION_FLIPTIME 13
#define ROTATE_SCREEN_OPTION_FLIPMOVE 14
-#define ROTATE_SCREEN_OPTION_NUM 15
+#define ROTATE_SCREEN_OPTION_TO_1 15
+#define ROTATE_SCREEN_OPTION_TO_2 16
+#define ROTATE_SCREEN_OPTION_TO_3 17
+#define ROTATE_SCREEN_OPTION_TO_4 18
+#define ROTATE_SCREEN_OPTION_TO_5 19
+#define ROTATE_SCREEN_OPTION_TO_6 20
+#define ROTATE_SCREEN_OPTION_TO_7 21
+#define ROTATE_SCREEN_OPTION_TO_8 22
+#define ROTATE_SCREEN_OPTION_TO_9 23
+#define ROTATE_SCREEN_OPTION_TO_10 24
+#define ROTATE_SCREEN_OPTION_TO_11 25
+#define ROTATE_SCREEN_OPTION_TO_12 26
+#define ROTATE_SCREEN_OPTION_TO_1_WINDOW 27
+#define ROTATE_SCREEN_OPTION_TO_2_WINDOW 28
+#define ROTATE_SCREEN_OPTION_TO_3_WINDOW 29
+#define ROTATE_SCREEN_OPTION_TO_4_WINDOW 30
+#define ROTATE_SCREEN_OPTION_TO_5_WINDOW 31
+#define ROTATE_SCREEN_OPTION_TO_6_WINDOW 32
+#define ROTATE_SCREEN_OPTION_TO_7_WINDOW 33
+#define ROTATE_SCREEN_OPTION_TO_8_WINDOW 34
+#define ROTATE_SCREEN_OPTION_TO_9_WINDOW 35
+#define ROTATE_SCREEN_OPTION_TO_10_WINDOW 36
+#define ROTATE_SCREEN_OPTION_TO_11_WINDOW 37
+#define ROTATE_SCREEN_OPTION_TO_12_WINDOW 38
+#define ROTATE_SCREEN_OPTION_NUM 39
typedef struct _RotateScreen {
PreparePaintScreenProc preparePaintScreen;
@@ -222,8 +246,32 @@
case ROTATE_SCREEN_OPTION_INITIATE:
case ROTATE_SCREEN_OPTION_LEFT:
case ROTATE_SCREEN_OPTION_RIGHT:
+ case ROTATE_SCREEN_OPTION_TO_1:
+ case ROTATE_SCREEN_OPTION_TO_2:
+ case ROTATE_SCREEN_OPTION_TO_3:
+ case ROTATE_SCREEN_OPTION_TO_4:
+ case ROTATE_SCREEN_OPTION_TO_5:
+ case ROTATE_SCREEN_OPTION_TO_6:
+ case ROTATE_SCREEN_OPTION_TO_7:
+ case ROTATE_SCREEN_OPTION_TO_8:
+ case ROTATE_SCREEN_OPTION_TO_9:
+ case ROTATE_SCREEN_OPTION_TO_10:
+ case ROTATE_SCREEN_OPTION_TO_11:
+ case ROTATE_SCREEN_OPTION_TO_12:
case ROTATE_SCREEN_OPTION_LEFT_WINDOW:
case ROTATE_SCREEN_OPTION_RIGHT_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_1_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_2_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_3_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_4_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_5_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_6_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_7_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_8_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_9_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_10_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_11_WINDOW:
+ case ROTATE_SCREEN_OPTION_TO_12_WINDOW:
if (addScreenBinding (screen, &value->bind))
{
removeScreenBinding (screen, &o->value.bind);
@@ -397,6 +445,35 @@
XKeysymToKeycode (display,
XStringToKeysym (ROTATE_RIGHT_WINDOW_KEY_DEFAULT));
+#define ROTATE_TO_OPTION(n) \
+ o = &rs->opt[ROTATE_SCREEN_OPTION_TO_ ## n]; \
+ o->name = "rotate_to_" #n; \
+ o->shortDesc = "Rotate To Face " #n; \
+ o->longDesc = "Rotate to face " #n; \
+ o->type = CompOptionTypeBinding; \
+ o->value.bind.type = CompBindingTypeNone; \
+ \
+ o = &rs->opt[ROTATE_SCREEN_OPTION_TO_ ## n ## _WINDOW]; \
+ o->name = "rotate_to_" #n "_window"; \
+ o->shortDesc = "Rotate To Face " #n " with Window"; \
+ o->longDesc = "Rotate to face " #n " and bring " \
+ "active window along"; \
+ o->type = CompOptionTypeBinding; \
+ o->value.bind.type = CompBindingTypeNone
+
+ ROTATE_TO_OPTION (1);
+ ROTATE_TO_OPTION (2);
+ ROTATE_TO_OPTION (3);
+ ROTATE_TO_OPTION (4);
+ ROTATE_TO_OPTION (5);
+ ROTATE_TO_OPTION (6);
+ ROTATE_TO_OPTION (7);
+ ROTATE_TO_OPTION (8);
+ ROTATE_TO_OPTION (9);
+ ROTATE_TO_OPTION (10);
+ ROTATE_TO_OPTION (11);
+ ROTATE_TO_OPTION (12);
+
o = &rs->opt[ROTATE_SCREEN_OPTION_SNAP_TOP];
o->name = "snap_top";
o->shortDesc = "Snap To Top Face";
@@ -841,7 +918,7 @@
{
CompScreen *s = NULL;
Bool warp = FALSE;
- int warpX = 0, warpY = 0, warpMove = 0;
+ int warpX = 0, warpY = 0, warpMove = 0, face;
ROTATE_DISPLAY (d);
@@ -870,6 +947,24 @@
event->xkey.y_root, 1);
else if (EV_KEY (&rs->opt[ROTATE_SCREEN_OPTION_RIGHT], event))
rotate (s, event->xkey.x_root, event->xkey.y_root, 1);
+
+ for (face = 0; face < 12 && face < s->size; face++)
+ {
+ if (EV_KEY (&rs->opt[ROTATE_SCREEN_OPTION_TO_1_WINDOW
+ + face], event))
+ {
+ rotateWithWindow (s, event->xkey.x_root,
+ event->xkey.y_root, face - s->x);
+ break;
+ }
+ else if (EV_KEY (&rs->opt[ROTATE_SCREEN_OPTION_TO_1 + face],
+ event))
+ {
+ rotate (s, event->xkey.x_root, event->xkey.y_root,
+ face - s->x);
+ break;
+ }
+ }
}
if (EV_KEY (&rs->opt[ROTATE_SCREEN_OPTION_TERMINATE], event))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/src/display.c new/compiz-0.0.9/src/display.c
--- old/compiz-0.0.9/src/display.c 2006-04-18 16:47:07.000000000 +0200
+++ new/compiz-0.0.9/src/display.c 2006-04-21 01:12:01.000000000 +0200
@@ -104,7 +104,7 @@
#define MAXIMIZE_WINDOW_KEY_DEFAULT "F10"
#define MAXIMIZE_WINDOW_MODIFIERS_DEFAULT (CompPressMask | CompAltMask)
-#define LOWER_WINDOW_BUTTON_DEFAULT Button2
+#define LOWER_WINDOW_BUTTON_DEFAULT 6
#define LOWER_WINDOW_MODIFIERS_DEFAULT (CompPressMask | CompAltMask)
#define OPACITY_INCREASE_BUTTON_DEFAULT Button4
@@ -121,6 +121,9 @@
#define RUN_WINDOW_SCREENSHOT_KEY_DEFAULT "Print"
#define RUN_WINDOW_SCREENSHOT_MODIFIERS_DEFAULT (CompPressMask | CompAltMask)
+#define WINDOW_MENU_BUTTON_DEFAULT Button3
+#define WINDOW_MENU_MODIFIERS_DEFAULT (CompPressMask | CompAltMask)
+
#define NUM_OPTIONS(d) (sizeof ((d)->opt) / sizeof (CompOption))
static char *textureFilter[] = { "Fast", "Good", "Best" };
@@ -400,6 +403,15 @@
o->value.s = strdup (WINDOW_SCREENSHOT_DEFAULT);
o->rest.s.string = NULL;
o->rest.s.nString = 0;
+
+ o = &display->opt[COMP_DISPLAY_OPTION_WINDOW_MENU];
+ o->name = "window_menu";
+ o->shortDesc = "Window Menu";
+ o->longDesc = "Open window menu";
+ o->type = CompOptionTypeBinding;
+ o->value.bind.type = CompBindingTypeButton;
+ o->value.bind.u.button.modifiers = WINDOW_MENU_MODIFIERS_DEFAULT;
+ o->value.bind.u.button.button = WINDOW_MENU_BUTTON_DEFAULT;
}
CompOption *
@@ -520,6 +532,7 @@
case COMP_DISPLAY_OPTION_OPACITY_DECREASE:
case COMP_DISPLAY_OPTION_RUN_SCREENSHOT:
case COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT:
+ case COMP_DISPLAY_OPTION_WINDOW_MENU:
if (addDisplayBinding (display, &value->bind))
{
removeDisplayBinding (display, &o->value.bind);
@@ -1457,6 +1470,19 @@
w->paint.brightness = 0xa8a8;
w->paint.saturation = 0;
+ if (w->closeRequests)
+ {
+ toolkitAction (s,
+ d->toolkitActionForceQuitDialogAtom,
+ w->lastCloseRequestTime,
+ w->id,
+ TRUE,
+ 0,
+ 0);
+
+ w->closeRequests = 0;
+ }
+
addWindowDamage (w);
}
}
@@ -1507,6 +1533,7 @@
&d->opt[COMP_DISPLAY_OPTION_OPACITY_DECREASE].value.bind);
addScreenBinding (s, &d->opt[COMP_DISPLAY_OPTION_RUN_SCREENSHOT].value.bind);
addScreenBinding (s, &d->opt[COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT].value.bind);
+ addScreenBinding (s, &d->opt[COMP_DISPLAY_OPTION_WINDOW_MENU].value.bind);
}
void
@@ -1700,11 +1727,16 @@
d->xBackgroundAtom[0] = XInternAtom (dpy, "_XSETROOT_ID", 0);
d->xBackgroundAtom[1] = XInternAtom (dpy, "_XROOTPMAP_ID", 0);
- d->panelActionAtom = XInternAtom (dpy, "_GNOME_PANEL_ACTION", 0);
- d->panelActionMainMenuAtom =
- XInternAtom (dpy, "_GNOME_PANEL_ACTION_MAIN_MENU", 0);
- d->panelActionRunDialogAtom =
- XInternAtom (dpy, "_GNOME_PANEL_ACTION_RUN_DIALOG", 0);
+ d->toolkitActionAtom =
+ XInternAtom (dpy, "_COMPIZ_TOOLKIT_ACTION", 0);
+ d->toolkitActionMainMenuAtom =
+ XInternAtom (dpy, "_COMPIZ_TOOLKIT_ACTION_MAIN_MENU", 0);
+ d->toolkitActionRunDialogAtom =
+ XInternAtom (dpy, "_COMPIZ_TOOLKIT_ACTION_RUN_DIALOG", 0);
+ d->toolkitActionWindowMenuAtom =
+ XInternAtom (dpy, "_COMPIZ_TOOLKIT_ACTION_WINDOW_MENU", 0);
+ d->toolkitActionForceQuitDialogAtom =
+ XInternAtom (dpy, "_COMPIZ_TOOLKIT_ACTION_FORCE_QUIT_DIALOG", 0);
d->mwmHintsAtom = XInternAtom (dpy, "_MOTIF_WM_HINTS", 0);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/src/event.c new/compiz-0.0.9/src/event.c
--- old/compiz-0.0.9/src/event.c 2006-04-18 16:47:07.000000000 +0200
+++ new/compiz-0.0.9/src/event.c 2006-04-20 20:38:25.000000000 +0200
@@ -399,7 +399,7 @@
{
w = findTopLevelWindowAtScreen (s, event->xbutton.window);
if (w)
- closeWindow (w);
+ closeWindow (w, event->xbutton.time);
eventMode = AsyncPointer;
}
@@ -432,20 +432,31 @@
eventMode = AsyncPointer;
}
- /* avoid panel actions when screen is grabbed */
+ /* avoid toolkit actions when screen is grabbed */
if (!d->screens->maxGrab)
{
if (EV_BUTTON (&d->opt[COMP_DISPLAY_OPTION_MAIN_MENU], event))
{
- panelAction (s, s->display->panelActionMainMenuAtom,
- event->xbutton.time);
+ toolkitAction (s, s->display->toolkitActionMainMenuAtom,
+ event->xbutton.time, s->root, 0, 0, 0);
eventMode = AsyncPointer;
}
if (EV_BUTTON (&d->opt[COMP_DISPLAY_OPTION_RUN_DIALOG], event))
{
- panelAction (s, s->display->panelActionRunDialogAtom,
- event->xbutton.time);
+ toolkitAction (s, s->display->toolkitActionRunDialogAtom,
+ event->xbutton.time, s->root, 0, 0, 0);
+ eventMode = AsyncPointer;
+ }
+
+ if (EV_BUTTON (&d->opt[COMP_DISPLAY_OPTION_WINDOW_MENU], event))
+ {
+ toolkitAction (s, s->display->toolkitActionWindowMenuAtom,
+ event->xbutton.time,
+ event->xbutton.window,
+ event->xbutton.button,
+ event->xbutton.x_root,
+ event->xbutton.y_root);
eventMode = AsyncPointer;
}
}
@@ -539,7 +550,7 @@
{
w = findTopLevelWindowAtScreen (s, d->activeWindow);
if (w)
- closeWindow (w);
+ closeWindow (w, event->xkey.time);
}
if (EV_KEY (&d->opt[COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW], event))
@@ -563,19 +574,29 @@
minimizeWindow (w);
}
- /* avoid panel actions when screen is grabbed */
+ /* avoid toolkit actions when screen is grabbed */
if (!d->screens->maxGrab)
{
if (EV_KEY (&d->opt[COMP_DISPLAY_OPTION_MAIN_MENU], event))
{
- panelAction (s, s->display->panelActionMainMenuAtom,
- event->xkey.time);
+ toolkitAction (s, s->display->toolkitActionMainMenuAtom,
+ event->xkey.time, s->root, 0, 0, 0);
}
if (EV_KEY (&d->opt[COMP_DISPLAY_OPTION_RUN_DIALOG], event))
{
- panelAction (s, s->display->panelActionRunDialogAtom,
- event->xkey.time);
+ toolkitAction (s, s->display->toolkitActionRunDialogAtom,
+ event->xkey.time, s->root, 0, 0, 0);
+ }
+
+ if (EV_KEY (&d->opt[COMP_DISPLAY_OPTION_WINDOW_MENU], event))
+ {
+ toolkitAction (s, s->display->toolkitActionWindowMenuAtom,
+ event->xkey.time,
+ d->activeWindow,
+ 0,
+ event->xkey.x_root,
+ event->xkey.y_root);
}
}
@@ -964,6 +985,19 @@
w->paint.saturation = w->saturation;
w->paint.brightness = w->brightness;
+ if (w->lastCloseRequestTime)
+ {
+ toolkitAction (w->screen,
+ d->toolkitActionForceQuitDialogAtom,
+ w->lastCloseRequestTime,
+ w->id,
+ FALSE,
+ 0,
+ 0);
+
+ w->lastCloseRequestTime = 0;
+ }
+
addWindowDamage (w);
}
w->lastPong = d->lastPing;
@@ -974,7 +1008,7 @@
{
w = findWindowAtDisplay (d, event->xclient.window);
if (w)
- closeWindow (w);
+ closeWindow (w, event->xclient.data.l[0]);
}
else if (event->xclient.message_type == d->desktopGeometryAtom)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/src/screen.c new/compiz-0.0.9/src/screen.c
--- old/compiz-0.0.9/src/screen.c 2006-04-14 17:08:31.000000000 +0200
+++ new/compiz-0.0.9/src/screen.c 2006-04-20 20:38:25.000000000 +0200
@@ -2274,21 +2274,25 @@
}
void
-panelAction (CompScreen *s,
- Atom panelAction,
- Time eventTime)
+toolkitAction (CompScreen *s,
+ Atom toolkitAction,
+ Time eventTime,
+ Window window,
+ long data0,
+ long data1,
+ long data2)
{
XEvent ev;
ev.type = ClientMessage;
- ev.xclient.window = s->root;
- ev.xclient.message_type = s->display->panelActionAtom;
+ ev.xclient.window = window;
+ ev.xclient.message_type = s->display->toolkitActionAtom;
ev.xclient.format = 32;
- ev.xclient.data.l[0] = panelAction;
+ ev.xclient.data.l[0] = toolkitAction;
ev.xclient.data.l[1] = eventTime;
- ev.xclient.data.l[2] = 0;
- ev.xclient.data.l[3] = 0;
- ev.xclient.data.l[4] = 0;
+ ev.xclient.data.l[2] = data0;
+ ev.xclient.data.l[3] = data1;
+ ev.xclient.data.l[4] = data2;
XUngrabPointer (s->display->display, CurrentTime);
XUngrabKeyboard (s->display->display, CurrentTime);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/compiz-0.0.9/src/window.c new/compiz-0.0.9/src/window.c
--- old/compiz-0.0.9/src/window.c 2006-04-20 02:58:27.000000000 +0200
+++ new/compiz-0.0.9/src/window.c 2006-04-20 20:38:25.000000000 +0200
@@ -1363,6 +1363,9 @@
w->syncCounter = 0;
w->syncWaitHandle = 0;
+ w->closeRequests = 0;
+ w->lastCloseRequestTime = 0;
+
if (screen->windowPrivateLen)
{
w->privates = malloc (screen->windowPrivateLen * sizeof (CompPrivate));
@@ -3050,30 +3053,48 @@
}
void
-closeWindow (CompWindow *w)
+closeWindow (CompWindow *w,
+ Time serverTime)
{
CompDisplay *display = w->screen->display;
- if (w->protocols & CompWindowProtocolDeleteMask)
+ if (w->alive)
{
- XEvent ev;
+ if (w->protocols & CompWindowProtocolDeleteMask)
+ {
+ XEvent ev;
- ev.type = ClientMessage;
- ev.xclient.window = w->id;
- ev.xclient.message_type = display->wmProtocolsAtom;
- ev.xclient.format = 32;
- ev.xclient.data.l[0] = display->wmDeleteWindowAtom;
- ev.xclient.data.l[1] = CurrentTime;
- ev.xclient.data.l[2] = 0;
- ev.xclient.data.l[3] = 0;
- ev.xclient.data.l[4] = 0;
+ ev.type = ClientMessage;
+ ev.xclient.window = w->id;
+ ev.xclient.message_type = display->wmProtocolsAtom;
+ ev.xclient.format = 32;
+ ev.xclient.data.l[0] = display->wmDeleteWindowAtom;
+ ev.xclient.data.l[1] = serverTime;
+ ev.xclient.data.l[2] = 0;
+ ev.xclient.data.l[3] = 0;
+ ev.xclient.data.l[4] = 0;
+
+ XSendEvent (display->display, w->id, FALSE, NoEventMask, &ev);
+ }
+ else
+ {
+ XKillClient (display->display, w->id);
+ }
- XSendEvent (display->display, w->id, FALSE, NoEventMask, &ev);
+ w->closeRequests++;
}
else
{
- XKillClient (display->display, w->id);
+ toolkitAction (w->screen,
+ w->screen->display->toolkitActionForceQuitDialogAtom,
+ serverTime,
+ w->id,
+ TRUE,
+ 0,
+ 0);
}
+
+ w->lastCloseRequestTime = serverTime;
}
void
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...