summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Robinson <pbrobinson@fedoraproject.org>2009-09-02 20:20:52 +0000
committerPeter Robinson <pbrobinson@fedoraproject.org>2009-09-02 20:20:52 +0000
commit17fc9606b731d3d6693b31f617e886f02d7e0294 (patch)
tree9a246628417fdefefef1f0e0a0016f79b2abc581
parent60fb7e8d1a30c00bd35c7ed3fba87440b23051c9 (diff)
downloadmetacity-17fc9606b731d3d6693b31f617e886f02d7e0294.tar.gz
metacity-17fc9606b731d3d6693b31f617e886f02d7e0294.tar.xz
metacity-17fc9606b731d3d6693b31f617e886f02d7e0294.zip
- Add upstreamed patch for option to force fullscreen for sugar - RHBZmetacity-2_27_0-9_fc12
516225
-rw-r--r--metacity-option-to-force-fullscreen.patch142
-rw-r--r--metacity.spec9
2 files changed, 150 insertions, 1 deletions
diff --git a/metacity-option-to-force-fullscreen.patch b/metacity-option-to-force-fullscreen.patch
new file mode 100644
index 0000000..f09adaf
--- /dev/null
+++ b/metacity-option-to-force-fullscreen.patch
@@ -0,0 +1,142 @@
+From b625ec30d99b2dcf86d8fa78b09f6d04dce3a6e0 Mon Sep 17 00:00:00 2001
+From: Tomeu Vizoso <tomeu@sugarlabs.org>
+Date: Fri, 19 Jun 2009 15:30:37 +0000
+Subject: Add a switch to disable autofullscreen'ing maximized windows without decorations
+
+---
+diff --git a/src/core/constraints.c b/src/core/constraints.c
+index 800b293..a060d20 100644
+--- a/src/core/constraints.c
++++ b/src/core/constraints.c
+@@ -27,6 +27,7 @@
+ #include "constraints.h"
+ #include "workspace.h"
+ #include "place.h"
++#include "prefs.h"
+
+ #include <stdlib.h>
+ #include <math.h>
+@@ -424,7 +425,8 @@ setup_constraint_info (ConstraintInfo *info,
+ /* Workaround braindead legacy apps that don't know how to
+ * fullscreen themselves properly.
+ */
+- if (meta_rectangle_equal (new, &xinerama_info->rect) &&
++ if (meta_prefs_get_force_fullscreen() &&
++ meta_rectangle_equal (new, &xinerama_info->rect) &&
+ window->has_fullscreen_func &&
+ !window->fullscreen)
+ {
+diff --git a/src/core/main.c b/src/core/main.c
+index 6c36f10..a36a396 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -233,6 +233,7 @@ typedef struct
+ gboolean sync;
+ gboolean composite;
+ gboolean no_composite;
++ gboolean no_force_fullscreen;
+ } MetaArguments;
+
+ #ifdef HAVE_COMPOSITE_EXTENSIONS
+@@ -314,6 +315,12 @@ meta_parse_options (int *argc, char ***argv,
+ N_("Turn compositing off"),
+ NULL
+ },
++ {
++ "no-force-fullscreen", 0, COMPOSITE_OPTS_FLAGS, G_OPTION_ARG_NONE,
++ &my_args.no_force_fullscreen,
++ N_("Don't make fullscreen windows that are maximized and have no decorations"),
++ NULL
++ },
+ {NULL}
+ };
+ GOptionContext *ctx;
+@@ -584,6 +591,9 @@ main (int argc, char **argv)
+ if (meta_args.composite || meta_args.no_composite)
+ meta_prefs_set_compositing_manager (meta_args.composite);
+
++ if (meta_args.no_force_fullscreen)
++ meta_prefs_set_force_fullscreen (FALSE);
++
+ if (!meta_display_open ())
+ meta_exit (META_EXIT_ERROR);
+
+diff --git a/src/core/prefs.c b/src/core/prefs.c
+index 1f4fe41..6e41b3c 100644
+--- a/src/core/prefs.c
++++ b/src/core/prefs.c
+@@ -95,6 +95,7 @@ static char *cursor_theme = NULL;
+ static int cursor_size = 24;
+ static gboolean compositing_manager = FALSE;
+ static gboolean resize_with_right_button = FALSE;
++static gboolean force_fullscreen = TRUE;
+
+ static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_FULLSCREEN_FLASH;
+ static MetaButtonLayout button_layout;
+@@ -1751,6 +1752,9 @@ meta_preference_to_string (MetaPreference pref)
+
+ case META_PREF_RESIZE_WITH_RIGHT_BUTTON:
+ return "RESIZE_WITH_RIGHT_BUTTON";
++
++ case META_PREF_FORCE_FULLSCREEN:
++ return "FORCE_FULLSCREEN";
+ }
+
+ return "(unknown)";
+@@ -2737,6 +2741,12 @@ meta_prefs_get_mouse_button_menu (void)
+ return resize_with_right_button ? 2: 3;
+ }
+
++gboolean
++meta_prefs_get_force_fullscreen (void)
++{
++ return force_fullscreen;
++}
++
+ void
+ meta_prefs_set_compositing_manager (gboolean whether)
+ {
+@@ -2797,3 +2807,10 @@ init_button_layout(void)
+ };
+
+ #endif
++
++void
++meta_prefs_set_force_fullscreen (gboolean whether)
++{
++ force_fullscreen = whether;
++}
++
+diff --git a/src/include/prefs.h b/src/include/prefs.h
+index 2f1ce8e..a4193ff 100644
+--- a/src/include/prefs.h
++++ b/src/include/prefs.h
+@@ -59,7 +59,8 @@ typedef enum
+ META_PREF_CURSOR_THEME,
+ META_PREF_CURSOR_SIZE,
+ META_PREF_COMPOSITING_MANAGER,
+- META_PREF_RESIZE_WITH_RIGHT_BUTTON
++ META_PREF_RESIZE_WITH_RIGHT_BUTTON,
++ META_PREF_FORCE_FULLSCREEN
+ } MetaPreference;
+
+ typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
+@@ -114,6 +115,7 @@ void meta_prefs_change_workspace_name (int i,
+ const char* meta_prefs_get_cursor_theme (void);
+ int meta_prefs_get_cursor_size (void);
+ gboolean meta_prefs_get_compositing_manager (void);
++gboolean meta_prefs_get_force_fullscreen (void);
+
+ /**
+ * Sets whether the compositor is turned on.
+@@ -122,6 +124,8 @@ gboolean meta_prefs_get_compositing_manager (void);
+ */
+ void meta_prefs_set_compositing_manager (gboolean whether);
+
++void meta_prefs_set_force_fullscreen (gboolean whether);
++
+ /* XXX FIXME This should be x-macroed, but isn't yet because it would be
+ * difficult (or perhaps impossible) to add the suffixes using the current
+ * system. It needs some more thought, perhaps after the current system
+--
+cgit v0.8.2
diff --git a/metacity.spec b/metacity.spec
index aa71ece..68a069d 100644
--- a/metacity.spec
+++ b/metacity.spec
@@ -1,7 +1,7 @@
Summary: Unobtrusive window manager
Name: metacity
Version: 2.27.0
-Release: 8%{?dist}
+Release: 9%{?dist}
URL: http://download.gnome.org/sources/metacity/
Source0: http://download.gnome.org/sources/metacity/2.27/metacity-%{version}.tar.bz2
# http://bugzilla.gnome.org/show_bug.cgi?id=558723
@@ -16,6 +16,8 @@ Patch7: 0001-bell-increase-bell-rate-limit-from-1-s-to-1-100ms.patch
Patch8: 0001-sound-ask-libcanberra-to-cache-alert-desktop-switch-.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=593358
Patch9: 0001-tooltip-set-window-type-hint-for-self-drawn-tooltips.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=516225
+Patch10: metacity-option-to-force-fullscreen.patch
License: GPLv2+
Group: User Interface/Desktops
@@ -81,6 +83,7 @@ API. This package exists purely for technical reasons.
%patch7 -p1 -b .bell
%patch8 -p1 -b .sound-cache
%patch9 -p1 -b .tooltip
+%patch10 -p1 -b .force-fullscreen
# force regeneration
rm src/metacity.schemas
@@ -188,6 +191,10 @@ fi
%{_mandir}/man1/metacity-window-demo.1.gz
%changelog
+* Wed Sep 2 2009 Peter Robinson <pbrobinson@gmail.com> - 2.27.0-9
+- Add upstreamed patch for option to force fullscreen for sugar
+- https://bugzilla.redhat.com/show_bug.cgi?id=516225
+
* Fri Aug 28 2009 Lennart Poettering <lpoetter@redhat.com> - 2.27.0-8
- Actually apply the patch from -7