From 7be4c63ee459feb21f22d85b2ccff5d882983cae Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 16 Sep 2001 21:50:27 +0000 Subject: [PATCH] new function 2001-09-16 Havoc Pennington * src/window.c (meta_window_lower): new function * configure.in: bump version to 2.3.8 * src/display.c (event_callback): raise dock on enter notify, lower it on leave notify (need to refine this behavior) * src/stack.c (compute_layer): experiment with putting the panel in the normal layer, and raising it on mouseover --- ChangeLog | 12 ++++++++++++ configure.in | 11 +---------- src/Makefile.am | 8 +------- src/display.c | 11 ++++++++++- src/stack.c | 3 ++- src/window.c | 8 ++++++++ src/window.h | 1 + 7 files changed, 35 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index c567d9769..e4a8c8359 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-09-16 Havoc Pennington + + * src/window.c (meta_window_lower): new function + + * configure.in: bump version to 2.3.8 + + * src/display.c (event_callback): raise dock on enter notify, + lower it on leave notify (need to refine this behavior) + + * src/stack.c (compute_layer): experiment with putting the panel + in the normal layer, and raising it on mouseover + 2001-09-15 Havoc Pennington * src/window.c: add support for a mini icon in the titlebar diff --git a/configure.in b/configure.in index 2cbb62ca4..13daceaad 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ AC_INIT(src/display.c) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(metacity, 2.3.5) +AM_INIT_AUTOMAKE(metacity, 2.3.8) GETTEXT_PACKAGE=metacity AC_SUBST(GETTEXT_PACKAGE) @@ -64,12 +64,6 @@ fi AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "true") -MSM_CFLAGS=$METACITY_CFLAGS -MSM_LIBS=$METACITY_LIBS - -AC_SUBST(MSM_CFLAGS) -AC_SUBST(MSM_LIBS) - HOST_ALIAS=$host_alias AC_SUBST(HOST_ALIAS) @@ -77,7 +71,4 @@ AC_OUTPUT([ Makefile src/Makefile src/wm-tester/Makefile -src/msm/Makefile ]) - - diff --git a/src/Makefile.am b/src/Makefile.am index 2019534c3..25d930735 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,11 +1,5 @@ -if HAVE_SM -SM_SUBDIRS=msm -else -SM_SUBDIRS= -endif - -SUBDIRS=wm-tester $(SM_SUBDIRS) +SUBDIRS=wm-tester INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" diff --git a/src/display.c b/src/display.c index 9c573138e..24ea36adb 100644 --- a/src/display.c +++ b/src/display.c @@ -741,9 +741,18 @@ event_callback (XEvent *event, case EnterNotify: /* do this even if window->has_focus to avoid races */ if (window && event->xany.serial != display->last_ignored_unmap_serial) - meta_window_focus (window, event->xcrossing.time); + { + meta_window_focus (window, event->xcrossing.time); + if (window->type == META_WINDOW_DOCK) + meta_window_raise (window); + } break; case LeaveNotify: + if (window) + { + if (window->type == META_WINDOW_DOCK) + meta_window_lower (window); + } break; case FocusIn: case FocusOut: diff --git a/src/stack.c b/src/stack.c index d030cf271..65af5e2f4 100644 --- a/src/stack.c +++ b/src/stack.c @@ -259,7 +259,8 @@ compute_layer (MetaWindow *window) break; case META_WINDOW_DOCK: - window->layer = META_LAYER_DOCK; + /* still experimenting here */ + window->layer = META_LAYER_NORMAL; break; case META_WINDOW_FULLSCREEN: diff --git a/src/window.c b/src/window.c index 0e3e82122..c253526be 100644 --- a/src/window.c +++ b/src/window.c @@ -2039,6 +2039,14 @@ meta_window_raise (MetaWindow *window) meta_stack_raise (window->screen->stack, window); } +void +meta_window_lower (MetaWindow *window) +{ + meta_verbose ("Lowering window %s\n", window->desc); + + meta_stack_lower (window->screen->stack, window); +} + void meta_window_send_icccm_message (MetaWindow *window, Atom atom, diff --git a/src/window.h b/src/window.h index 9a23a4f1f..8abcc0764 100644 --- a/src/window.h +++ b/src/window.h @@ -299,6 +299,7 @@ void meta_window_delete (MetaWindow *window, void meta_window_focus (MetaWindow *window, Time timestamp); void meta_window_raise (MetaWindow *window); +void meta_window_lower (MetaWindow *window); /* Sends a client message */