After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 126872 - Non EWMH fullscreen apps are constrained within menu bars
Non EWMH fullscreen apps are constrained within menu bars
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: EWMH specification
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2003-11-13 06:05 UTC by Keith Packard
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Keith Packard 2003-11-13 06:05:48 UTC
Non EWMH apps (like xine) which use traditional methods to request full
screen display (static gravity at 0,0, full width/height) are nevertheless
constrained by metacity to fall within the normal application area, and not
cover the menu bar.

Index: constraints.c
===================================================================
RCS file: /cvs/gnome/metacity/src/constraints.c,v
retrieving revision 1.19
diff -u -r1.19 constraints.c
--- constraints.c       7 Oct 2003 02:08:45 -0000       1.19
+++ constraints.c       13 Nov 2003 05:41:43 -0000
@@ -340,7 +340,7 @@
 constraint_onscreen_applies_func (MetaWindow *window)
 {
   return
-    !window->fullscreen &&
+    !window->fullscreen && !meta_window_is_fullscreen_size (window) &&
     window->type != META_WINDOW_DESKTOP &&
     window->type != META_WINDOW_DOCK;
 }
Index: stack.c
===================================================================
RCS file: /cvs/gnome/metacity/src/stack.c,v
retrieving revision 1.67
diff -u -r1.67 stack.c
--- stack.c     19 Aug 2003 20:10:45 -0000      1.67
+++ stack.c     13 Nov 2003 05:41:45 -0000
@@ -178,8 +178,8 @@
   meta_stack_sync_to_server (stack);
 }

-static gboolean
-window_is_fullscreen_size (MetaWindow *window)
+gboolean
+meta_window_is_fullscreen_size (MetaWindow *window)
 {
   int i;

@@ -268,7 +268,7 @@
         layer = META_LAYER_BOTTOM;
       else if ((window->has_focus || focused_transient ||
                 (window == window->display->expected_focus_window)) &&
-               (window->fullscreen || window_is_fullscreen_size (window)))
+               (window->fullscreen || meta_window_is_fullscreen_size
(window)))
         layer = META_LAYER_FULLSCREEN;
       else if (window->wm_state_above)
         layer = META_LAYER_DOCK;
Index: stack.h
===================================================================
RCS file: /cvs/gnome/metacity/src/stack.h,v
retrieving revision 1.16
diff -u -r1.16 stack.h
--- stack.h     22 Jan 2003 04:54:03 -0000      1.16
+++ stack.h     13 Nov 2003 05:41:45 -0000
@@ -110,6 +110,8 @@
 void       meta_stack_freeze    (MetaStack      *stack);
 void       meta_stack_thaw      (MetaStack      *stack);

+gboolean   meta_window_is_fullscreen_size (MetaWindow  *window);
+
 MetaWindow* meta_stack_get_top    (MetaStack  *stack);
 MetaWindow* meta_stack_get_bottom (MetaStack  *stack);
 MetaWindow* meta_stack_get_above  (MetaStack  *stack,
Comment 1 Havoc Pennington 2003-11-13 14:30:29 UTC
The fix isn't right, because constraints.c is a complete fuckup.
There's long discussion on some other bugs and some suggested fixes,
and read the large comment at top of constraints.c on how it
supposedly "works"

Anyway, you can't base which constraints to apply on the *current*
window size, because the window may be in the process of being resized
to fullscreen size (or being resized to not-fullscreen-size).

Comment 2 Rob Adams 2003-11-16 03:50:33 UTC
does this really not work in metacity HEAD, Keith?  This should be
working now, since there's code now to let such windows break constraints.
Comment 3 Luis Villa 2004-01-02 23:53:27 UTC
This is a fairly frequently reported problem in IRC and user support 
forums- it would be nice to have a fix. [Sadly I can't test HEAD ATM-
 hopefully Monday.]
Comment 4 Keith Packard 2004-01-03 00:06:26 UTC
Thanks louie for reminding me to check.  I'm running HEAD with a few
minor changes that shouldn't relate to this bug and xine works just
fine in full-screen mode.  I believe that means the problem has been
fixed.