Theme breakage! Themes have to implement "border" frames now, see Atlanta

2002-06-21  Havoc Pennington  <hp@pobox.com>

        Theme breakage! Themes have to implement "border" frames
	now, see Atlanta for an example. Fixes #84285

	* src/tools/metacity-window-demo.c (do_appwindow): add a
	border-only window

	* src/window.c (update_mwm_hints): read border only from the MWM
	hints

	* src/window.h (struct _MetaWindow): add border_only flag

	* src/core.c (meta_core_get_frame_type): report border type if
	required

	* src/common.h (enum): add META_FRAME_TYPE_BORDER
This commit is contained in:
Havoc Pennington
2002-06-22 03:23:02 +00:00
committed by Havoc Pennington
parent 854e58fd82
commit de42a62f4e
10 changed files with 198 additions and 25 deletions

View File

@ -66,6 +66,7 @@ meta_core_get_frame_type (Display *xdisplay,
{
MetaDisplay *display;
MetaWindow *window;
MetaFrameType base_type;
display = meta_display_for_x_display (xdisplay);
window = meta_display_lookup_x_window (display, frame_xwindow);
@ -73,26 +74,28 @@ meta_core_get_frame_type (Display *xdisplay,
if (window == NULL || window->frame == NULL)
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
base_type = META_FRAME_TYPE_LAST;
switch (window->type)
{
case META_WINDOW_NORMAL:
return META_FRAME_TYPE_NORMAL;
base_type = META_FRAME_TYPE_NORMAL;
break;
case META_WINDOW_DIALOG:
return META_FRAME_TYPE_DIALOG;
base_type = META_FRAME_TYPE_DIALOG;
break;
case META_WINDOW_MODAL_DIALOG:
return META_FRAME_TYPE_MODAL_DIALOG;
base_type = META_FRAME_TYPE_MODAL_DIALOG;
break;
case META_WINDOW_MENU:
return META_FRAME_TYPE_MENU;
base_type = META_FRAME_TYPE_MENU;
break;
case META_WINDOW_UTILITY:
return META_FRAME_TYPE_UTILITY;
base_type = META_FRAME_TYPE_UTILITY;
break;
case META_WINDOW_DESKTOP:
@ -100,12 +103,16 @@ meta_core_get_frame_type (Display *xdisplay,
case META_WINDOW_TOOLBAR:
case META_WINDOW_SPLASHSCREEN:
/* No frame */
return META_FRAME_TYPE_LAST;
base_type = META_FRAME_TYPE_LAST;
break;
}
g_assert_not_reached ();
return META_FRAME_TYPE_LAST;
if (base_type == META_FRAME_TYPE_LAST)
return META_FRAME_TYPE_LAST; /* can't add border if undecorated */
else if (window->border_only)
return META_FRAME_TYPE_BORDER; /* override base frame type */
else
return base_type;
}
GdkPixbuf*