mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
call setlocale ourselves because due to a GLib bug that sticks us in ASCII
2002-04-22 Havoc Pennington <hp@redhat.com> * src/main.c (main): call setlocale ourselves because due to a GLib bug that sticks us in ASCII if you call g_print or anything prior to setlocale, and print a warning if we don't set the locale successfully. #79280 * src/workspace.c (meta_workspace_get_work_area): be more verbose about how the work area was computed, to help find bugs here. * src/main.c (main): put locale and codeset in the log file
This commit is contained in:
parent
1d818b7b7c
commit
5fd4fb96f7
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2002-04-22 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* src/main.c (main): call setlocale ourselves because due to a
|
||||
GLib bug that sticks us in ASCII if you call g_print or anything
|
||||
prior to setlocale, and print a warning if we don't set the locale
|
||||
successfully. #79280
|
||||
|
||||
* src/workspace.c (meta_workspace_get_work_area): be more verbose
|
||||
about how the work area was computed, to help find bugs here.
|
||||
|
||||
* src/main.c (main): put locale and codeset in the log file
|
||||
|
||||
2002-04-21 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/window.c (meta_window_send_icccm_message): add error trap,
|
||||
|
@ -64,7 +64,10 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
XVisualIDFromVisual (window->screen->default_xvisual) ?
|
||||
"is" : "is not",
|
||||
window->depth, window->screen->default_depth);
|
||||
|
||||
meta_verbose ("Frame geometry %d,%d %dx%d\n",
|
||||
frame->rect.x, frame->rect.y,
|
||||
frame->rect.width, frame->rect.height);
|
||||
|
||||
/* Default depth/visual handles clients with weird visuals; they can
|
||||
* always be children of the root depth/visual obviously, but
|
||||
* e.g. DRI games can't be children of a parent that has the same
|
||||
|
22
src/main.c
22
src/main.c
@ -73,6 +73,11 @@ main (int argc, char **argv)
|
||||
gboolean disable_sm;
|
||||
const char *prev_arg;
|
||||
const char *save_file;
|
||||
|
||||
g_set_prgname (argv[0]);
|
||||
|
||||
if (setlocale (LC_ALL, "") == NULL)
|
||||
meta_warning ("Locale not understood by C library, internationalization will not work\n");
|
||||
|
||||
sigemptyset (&empty_mask);
|
||||
act.sa_handler = SIG_IGN;
|
||||
@ -84,19 +89,24 @@ main (int argc, char **argv)
|
||||
if (sigaction (SIGXFSZ, &act, 0) < 0)
|
||||
g_printerr ("Failed to register SIGXFSZ handler: %s\n", strerror (errno));
|
||||
#endif
|
||||
|
||||
g_set_prgname (argv[0]);
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, METACITY_LOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
if (g_getenv ("METACITY_VERBOSE"))
|
||||
meta_set_verbose (TRUE);
|
||||
if (g_getenv ("METACITY_DEBUG"))
|
||||
meta_set_debugging (TRUE);
|
||||
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
|
||||
|
||||
{
|
||||
const char *charset;
|
||||
g_get_charset (&charset);
|
||||
meta_verbose ("Running in locale \"%s\" with encoding \"%s\"\n",
|
||||
setlocale (LC_ALL, NULL), charset);
|
||||
}
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, METACITY_LOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
/* Parse options lamely */
|
||||
|
||||
display_name = NULL;
|
||||
|
@ -386,6 +386,11 @@ meta_workspace_get_work_area (MetaWorkspace *workspace,
|
||||
|
||||
if (w->has_struts)
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Merging win %s with %d %d %d %d with %d %d %d %d\n",
|
||||
w->desc,
|
||||
w->left_strut, w->right_strut, w->top_strut, w->bottom_strut,
|
||||
left_strut, right_strut, top_strut, bottom_strut);
|
||||
left_strut = MAX (left_strut, w->left_strut);
|
||||
right_strut = MAX (right_strut, w->right_strut);
|
||||
top_strut = MAX (top_strut, w->top_strut);
|
||||
@ -402,12 +407,18 @@ meta_workspace_get_work_area (MetaWorkspace *workspace,
|
||||
|
||||
if ((left_strut + right_strut) > (workspace->screen->width - MIN_SANE_AREA))
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Making left/right struts %d %d sane\n",
|
||||
left_strut, right_strut);
|
||||
left_strut = (workspace->screen->width - MIN_SANE_AREA) / 2;
|
||||
right_strut = left_strut;
|
||||
}
|
||||
|
||||
if ((top_strut + bottom_strut) > (workspace->screen->height - MIN_SANE_AREA))
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Making top/bottom struts %d %d sane\n",
|
||||
top_strut, bottom_strut);
|
||||
top_strut = (workspace->screen->height - MIN_SANE_AREA) / 2;
|
||||
bottom_strut = top_strut;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user