Hi,

If upgrading to newer 2.27.1 is unwanted (e.g. if odd numbers are development releases) then attached is a backported patch implementing the --no-force-fullscreen option needed for sugar-0.86.

Please consider either upgrading to at lease 2.27.1 or applying this patch.


Kind regards,

 - Jonas

--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
diff -ruN metacity-2.27.0/src/core/constraints.c metacity-2.27.1/src/core/constraints.c
--- metacity-2.27.0/src/core/constraints.c	2008-11-22 19:38:09.000000000 +0100
+++ metacity-2.27.1/src/core/constraints.c	2009-09-08 22:55:35.000000000 +0200
@@ -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 @@
   /* 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 -ruN metacity-2.27.0/src/core/main.c metacity-2.27.1/src/core/main.c
--- metacity-2.27.0/src/core/main.c	2009-02-18 23:15:00.000000000 +0100
+++ metacity-2.27.1/src/core/main.c	2009-09-08 22:55:35.000000000 +0200
@@ -219,6 +219,7 @@
   gboolean sync;
   gboolean composite;
   gboolean no_composite;
+  gboolean no_force_fullscreen;
 } MetaArguments;
 
 #ifdef HAVE_COMPOSITE_EXTENSIONS
@@ -300,6 +301,12 @@
       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;
@@ -526,6 +533,9 @@
   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 -ruN metacity-2.27.0/src/core/prefs.c metacity-2.27.1/src/core/prefs.c
--- metacity-2.27.0/src/core/prefs.c	2009-01-28 06:33:00.000000000 +0100
+++ metacity-2.27.1/src/core/prefs.c	2009-09-08 22:55:35.000000000 +0200
@@ -95,6 +95,7 @@
 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 @@
 
     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 @@
   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 @@
 };
 
 #endif
+
+void
+meta_prefs_set_force_fullscreen (gboolean whether)
+{
+  force_fullscreen = whether;
+}
+
diff -ruN metacity-2.27.0/src/core/screen.c metacity-2.27.1/src/core/screen.c
--- metacity-2.27.0/src/core/screen.c	2008-10-19 23:15:38.000000000 +0200
+++ metacity-2.27.1/src/core/screen.c	2009-09-08 22:55:35.000000000 +0200
@@ -86,6 +86,13 @@
   return Success;
 }
 
+static void
+unset_wm_check_hint (MetaScreen *screen)
+{
+  XDeleteProperty (screen->display->xdisplay, screen->xroot, 
+                   screen->display->atom__NET_SUPPORTING_WM_CHECK);
+}
+
 static int
 set_supported_hint (MetaScreen *screen)
 {
@@ -661,6 +668,8 @@
     meta_warning (_("Could not release screen %d on display \"%s\"\n"),
                   screen->number, screen->display->name);
 
+  unset_wm_check_hint (screen);
+
   XDestroyWindow (screen->display->xdisplay,
                   screen->wm_sn_selection_window);
   
diff -ruN metacity-2.27.0/src/include/prefs.h metacity-2.27.1/src/include/prefs.h
--- metacity-2.27.0/src/include/prefs.h	2009-01-28 06:33:00.000000000 +0100
+++ metacity-2.27.1/src/include/prefs.h	2009-09-08 22:55:35.000000000 +0200
@@ -59,7 +59,8 @@
   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 @@
 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 @@
  */
 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

Attachment: signature.asc
Description: Digital signature

Reply via email to