use hash_table_replace instead of g_hash_table_insert
2002-03-06 Havoc Pennington <hp@redhat.com> * src/frames.c (meta_frames_manage_window): use hash_table_replace instead of g_hash_table_insert * src/main.c (main): only enable verbose/debug if you set METACITY_VERBOSE/METACITY_DEBUG * src/util.c (ensure_logfile): only use a log file if METACITY_USE_LOGFILE is set * src/display.c (meta_display_for_x_display): add warning if MetaDisplay isn't found * src/window.c (meta_window_free): add an assertion that we successfully cleared the grab window
This commit is contained in:
parent
d443d92446
commit
262e6fab27
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
|||||||
|
2002-03-06 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
|
* src/frames.c (meta_frames_manage_window): use hash_table_replace
|
||||||
|
instead of g_hash_table_insert
|
||||||
|
|
||||||
|
* src/main.c (main): only enable verbose/debug if you set
|
||||||
|
METACITY_VERBOSE/METACITY_DEBUG
|
||||||
|
|
||||||
|
* src/util.c (ensure_logfile): only use a log file if
|
||||||
|
METACITY_USE_LOGFILE is set
|
||||||
|
|
||||||
|
* src/display.c (meta_display_for_x_display): add warning if
|
||||||
|
MetaDisplay isn't found
|
||||||
|
|
||||||
|
* src/window.c (meta_window_free): add an assertion that we
|
||||||
|
successfully cleared the grab window
|
||||||
|
|
||||||
2002-03-05 Havoc Pennington <hp@pobox.com>
|
2002-03-05 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
Work on opaque animations more, still suck too much
|
Work on opaque animations more, still suck too much
|
||||||
|
@ -651,6 +651,9 @@ meta_display_for_x_display (Display *xdisplay)
|
|||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
meta_warning ("Could not find display for X display %p, probably going to crash\n",
|
||||||
|
xdisplay);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ meta_frames_ensure_layout (MetaFrames *frames,
|
|||||||
meta_pango_font_desc_get_text_height (font_desc,
|
meta_pango_font_desc_get_text_height (font_desc,
|
||||||
gtk_widget_get_pango_context (widget));
|
gtk_widget_get_pango_context (widget));
|
||||||
|
|
||||||
g_hash_table_insert (frames->text_heights,
|
g_hash_table_replace (frames->text_heights,
|
||||||
&size,
|
&size,
|
||||||
GINT_TO_POINTER (frame->text_height));
|
GINT_TO_POINTER (frame->text_height));
|
||||||
}
|
}
|
||||||
@ -434,7 +434,7 @@ meta_frames_manage_window (MetaFrames *frames,
|
|||||||
|
|
||||||
meta_core_grab_buttons (gdk_display, frame->xwindow);
|
meta_core_grab_buttons (gdk_display, frame->xwindow);
|
||||||
|
|
||||||
g_hash_table_insert (frames->frames, &frame->xwindow, frame);
|
g_hash_table_replace (frames->frames, &frame->xwindow, frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -90,7 +90,9 @@ main (int argc, char **argv)
|
|||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
textdomain (GETTEXT_PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
|
if (g_getenv ("METACITY_VERBOSE"))
|
||||||
meta_set_verbose (TRUE);
|
meta_set_verbose (TRUE);
|
||||||
|
if (g_getenv ("METACITY_DEBUG"))
|
||||||
meta_set_debugging (TRUE);
|
meta_set_debugging (TRUE);
|
||||||
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
|
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ static FILE* logfile = NULL;
|
|||||||
static void
|
static void
|
||||||
ensure_logfile (void)
|
ensure_logfile (void)
|
||||||
{
|
{
|
||||||
if (logfile == NULL)
|
if (logfile == NULL && g_getenv ("METACITY_USE_LOGFILE"))
|
||||||
{
|
{
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
char *tmpl;
|
char *tmpl;
|
||||||
|
@ -737,6 +737,8 @@ meta_window_free (MetaWindow *window)
|
|||||||
meta_display_end_grab_op (window->display,
|
meta_display_end_grab_op (window->display,
|
||||||
meta_display_get_current_time (window->display));
|
meta_display_get_current_time (window->display));
|
||||||
|
|
||||||
|
g_assert (window->display->grab_window != window);
|
||||||
|
|
||||||
if (window->display->focus_window == window)
|
if (window->display->focus_window == window)
|
||||||
window->display->focus_window = NULL;
|
window->display->focus_window = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user