mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
we didn't claim to support _NET_ACTIVE_WINDOW so gtk_window_present()
2002-03-10 Havoc Pennington <hp@pobox.com> * src/screen.c (set_supported_hint): we didn't claim to support _NET_ACTIVE_WINDOW so gtk_window_present() didn't work. Mumble. Only worked with tasklist because libwnck didn't check for WM support. * src/window.c (meta_window_free): clean off window state when windows are withdrawn, to avoid sticking dialogs to their initial desktop. (meta_window_queue_calc_showing): return if window is withdrawn
This commit is contained in:
parent
5e8ceda7e7
commit
447eba6007
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2002-03-10 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/screen.c (set_supported_hint): we didn't claim to support
|
||||
_NET_ACTIVE_WINDOW so gtk_window_present() didn't work. Mumble.
|
||||
Only worked with tasklist because libwnck didn't check for
|
||||
WM support.
|
||||
|
||||
* src/window.c (meta_window_free): clean off window state
|
||||
when windows are withdrawn, to avoid sticking dialogs
|
||||
to their initial desktop.
|
||||
(meta_window_queue_calc_showing): return if window is withdrawn
|
||||
|
||||
2002-03-08 Laszlo Peter <laca@ireland.sun.com>
|
||||
|
||||
* configure.in: fix the X linker flags
|
||||
|
@ -526,6 +526,10 @@ meta_core_get_grab_frame (Display *xdisplay)
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
|
||||
g_assert (display != NULL);
|
||||
g_assert (display->grab_op == META_GRAB_OP_NONE ||
|
||||
display->grab_window != NULL);
|
||||
g_assert (display->grab_op == META_GRAB_OP_NONE ||
|
||||
display->grab_window->display->xdisplay == xdisplay);
|
||||
|
||||
if (display->grab_op != META_GRAB_OP_NONE &&
|
||||
display->grab_window->frame)
|
||||
|
@ -1646,6 +1646,9 @@ meta_spew_event (MetaDisplay *display,
|
||||
break;
|
||||
case ResizeRequest:
|
||||
name = "ResizeRequest";
|
||||
extra = g_strdup_printf ("width = %d height = %d",
|
||||
event->xresizerequest.width,
|
||||
event->xresizerequest.height);
|
||||
break;
|
||||
case CirculateNotify:
|
||||
name = "CirculateNotify";
|
||||
|
@ -75,5 +75,5 @@ if test -z "$ONLY_WM"; then
|
||||
fi
|
||||
|
||||
if test -z "$ONLY_SETUP"; then
|
||||
METACITY_DEBUG_BUTTON_GRABS=1 METACITY_DISPLAY=$CLIENT_DISPLAY exec libtool --mode=execute $DEBUG ./metacity $OPTIONS
|
||||
METACITY_VERBOSE=1 METACITY_DEBUG=1 METACITY_USE_LOGFILE=1 METACITY_DEBUG_BUTTON_GRABS=1 METACITY_DISPLAY=$CLIENT_DISPLAY exec libtool --mode=execute $DEBUG ./metacity $OPTIONS
|
||||
fi
|
||||
|
@ -78,7 +78,7 @@ set_wm_check_hint (MetaScreen *screen)
|
||||
static int
|
||||
set_supported_hint (MetaScreen *screen)
|
||||
{
|
||||
#define N_SUPPORTED 28
|
||||
#define N_SUPPORTED 29
|
||||
#define N_WIN_SUPPORTED 1
|
||||
Atom atoms[N_SUPPORTED];
|
||||
|
||||
@ -110,6 +110,7 @@ set_supported_hint (MetaScreen *screen)
|
||||
atoms[25] = screen->display->atom_net_wm_window_type_splashscreen;
|
||||
atoms[26] = screen->display->atom_net_wm_state_fullscreen;
|
||||
atoms[27] = screen->display->atom_net_wm_ping;
|
||||
atoms[28] = screen->display->atom_net_active_window;
|
||||
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_supported,
|
||||
|
52
src/window.c
52
src/window.c
@ -134,6 +134,22 @@ static void meta_window_apply_session_info (MetaWindow *window,
|
||||
const MetaWindowSessionInfo *info);
|
||||
|
||||
|
||||
static const char*
|
||||
wm_state_to_string (int state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case NormalState:
|
||||
return "NormalState";
|
||||
case IconicState:
|
||||
return "IconicState";
|
||||
case WithdrawnState:
|
||||
return "WithdrawnState";
|
||||
}
|
||||
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
MetaWindow*
|
||||
meta_window_new (MetaDisplay *display, Window xwindow,
|
||||
gboolean must_be_viewable)
|
||||
@ -176,7 +192,8 @@ meta_window_new (MetaDisplay *display, Window xwindow,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
meta_verbose ("attrs.map_state = %d (%s)\n",
|
||||
meta_verbose ("must_be_viewable = %d attrs.map_state = %d (%s)\n",
|
||||
must_be_viewable,
|
||||
attrs.map_state,
|
||||
(attrs.map_state == IsUnmapped) ?
|
||||
"IsUnmapped" :
|
||||
@ -205,6 +222,8 @@ meta_window_new (MetaDisplay *display, Window xwindow,
|
||||
}
|
||||
|
||||
existing_wm_state = state;
|
||||
meta_verbose ("WM_STATE of %lx = %s\n", xwindow,
|
||||
wm_state_to_string (existing_wm_state));
|
||||
}
|
||||
|
||||
meta_error_trap_push (display);
|
||||
@ -768,7 +787,21 @@ meta_window_free (MetaWindow *window)
|
||||
/* FIXME restore original size if window has maximized */
|
||||
|
||||
if (window->withdrawn)
|
||||
set_wm_state (window, WithdrawnState);
|
||||
{
|
||||
/* We need to clean off the window's state so it
|
||||
* won't be restored if the app maps it again.
|
||||
*/
|
||||
meta_error_trap_push (window->display);
|
||||
meta_verbose ("Cleaning state from window %s\n", window->desc);
|
||||
XDeleteProperty (window->display->xdisplay,
|
||||
window->xwindow,
|
||||
window->display->atom_net_wm_desktop);
|
||||
XDeleteProperty (window->display->xdisplay,
|
||||
window->xwindow,
|
||||
window->display->atom_net_wm_state);
|
||||
set_wm_state (window, WithdrawnState);
|
||||
meta_error_trap_pop (window->display);
|
||||
}
|
||||
|
||||
if (window->frame)
|
||||
meta_window_destroy_frame (window);
|
||||
@ -811,7 +844,10 @@ set_wm_state (MetaWindow *window,
|
||||
int state)
|
||||
{
|
||||
unsigned long data[2];
|
||||
|
||||
|
||||
meta_verbose ("Setting wm state %s on %s\n",
|
||||
wm_state_to_string (state), window->desc);
|
||||
|
||||
/* twm sets the icon window as data[1], I couldn't find that in
|
||||
* ICCCM.
|
||||
*/
|
||||
@ -1072,7 +1108,10 @@ meta_window_flush_calc_showing (MetaWindow *window)
|
||||
void
|
||||
meta_window_queue_calc_showing (MetaWindow *window)
|
||||
{
|
||||
if (window->unmanaging)
|
||||
/* if withdrawn = TRUE then unmanaging should also be TRUE,
|
||||
* really.
|
||||
*/
|
||||
if (window->unmanaging || window->withdrawn)
|
||||
return;
|
||||
|
||||
if (window->calc_showing_queued)
|
||||
@ -2628,7 +2667,10 @@ meta_window_set_current_workspace_hint (MetaWindow *window)
|
||||
unsigned long data[1];
|
||||
|
||||
if (window->workspaces == NULL)
|
||||
return Success; /* this happens when destroying windows */
|
||||
{
|
||||
/* this happens when unmanaging windows */
|
||||
return Success;
|
||||
}
|
||||
|
||||
data[0] = meta_window_get_net_wm_desktop (window);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user