From 78af5d15e9dd94959786811e9eddfa1e5024067c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 2 Mar 2007 02:23:00 +0000 Subject: this includes a number of things since my magnificent return.... 1. some random compiling/style cleanups 2. some bigfixes - mislogic in per-window-settings and focusing new windows - use client_can_focus rather than checking variables for directional focus - MAYBE fix all those lock-ups forever. using event_curtime (a new variable) now instead of event_lasttime. event_lasttime is still used however when the event being processed did not have a time associated with it. this may or may not be a problem, and will be seen. 3. um.. i forget 4. oh yeah, 3rd party docks are now treated like the internal ob dock irt focus. that is, clicking on them won't pass them focus. this is going to be ratified as expected behavior in the wm-spec just now. if docks/panels want focus they can request it with _net_active_window, and then they can have all the focus they want! one day alt-tabbing around dock windows might be nice. but not until the ob dock is moved out into a separate application. going to have to add a wmapp selection and stuff for that though... ugly. who uses wmdockapps anymore !? someone must.. *sigh* --- render/font.c | 34 +++++++++++++++++++--------------- render/icon.h | 4 ++-- render/render.h | 2 +- 3 files changed, 22 insertions(+), 18 deletions(-) (limited to 'render') diff --git a/render/font.c b/render/font.c index 0521e2af..14b9ea14 100644 --- a/render/font.c +++ b/render/font.c @@ -116,12 +116,12 @@ static RrFont *openfont(const RrInstance *inst, gchar *fontstring) if (FcPatternGetString(match, "style", 0, &tmp_string) != FcResultTypeMismatch) { /* Bold ? */ - if (!strcasecmp("bold", (gchar *)tmp_string)) { + if (!g_ascii_strcasecmp("bold", (gchar *)tmp_string)) { pango_font_description_set_weight(out->pango_font_description, PANGO_WEIGHT_BOLD); } /* Italic ? */ - else if (!strcasecmp("italic", (gchar *)tmp_string)) { + else if (!g_ascii_strcasecmp("italic", (gchar *)tmp_string)) { pango_font_description_set_style(out->pango_font_description, PANGO_STYLE_ITALIC); } @@ -135,19 +135,23 @@ static RrFont *openfont(const RrInstance *inst, gchar *fontstring) } /* based on gtkmain.c gtk_get_default_language() */ - gchar *locale, *p; - locale = g_strdup(setlocale(LC_CTYPE, NULL)); - if ((p = strchr(locale, '.'))) - *p = '\0'; - if ((p = strchr(locale, '@'))) - *p = '\0'; - PangoFontMetrics *metrics = - pango_context_get_metrics(context, out->pango_font_description, - pango_language_from_string(locale)); - out->pango_ascent = pango_font_metrics_get_ascent(metrics); - out->pango_descent = pango_font_metrics_get_descent(metrics); - g_free(locale); - pango_font_metrics_unref(metrics); + { + gchar *locale, *p; + PangoFontMetrics *metrics; + + locale = g_strdup(setlocale(LC_CTYPE, NULL)); + if ((p = strchr(locale, '.'))) + *p = '\0'; + if ((p = strchr(locale, '@'))) + *p = '\0'; + metrics = + pango_context_get_metrics(context, out->pango_font_description, + pango_language_from_string(locale)); + out->pango_ascent = pango_font_metrics_get_ascent(metrics); + out->pango_descent = pango_font_metrics_get_descent(metrics); + g_free(locale); + pango_font_metrics_unref(metrics); + } #endif /* USE_PANGO */ if (FcPatternGetBool(match, OB_SHADOW, 0, &out->shadow) != FcResultMatch) diff --git a/render/icon.h b/render/icon.h index 7d0626e2..eafa6961 100644 --- a/render/icon.h +++ b/render/icon.h @@ -25,7 +25,7 @@ "To recreate this file, save an image as \"C-Source\" in The Gimp. Use \"ob_default_icon\" as the Prefixed Name. Enable Glib Types. Enable Save Alpha Channel. Enable Use Macros instead of Struct." #define OB_DEFAULT_ICON_PIXEL_DATA ((guint8*) OB_DEFAULT_ICON_pixel_data) static const guint8 OB_DEFAULT_ICON_pixel_data[48 * 48 * 4 + 1] = -("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" @@ -435,5 +435,5 @@ static const guint8 OB_DEFAULT_ICON_pixel_data[48 * 48 * 4 + 1] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" - "\0\0\0\0"); + "\0\0\0\0"; diff --git a/render/render.h b/render/render.h index fda40607..ac1394cf 100644 --- a/render/render.h +++ b/render/render.h @@ -68,7 +68,7 @@ typedef enum { RR_SURFACE_DIAGONAL, RR_SURFACE_CROSS_DIAGONAL, RR_SURFACE_PYRAMID, - RR_SURFACE_MIRROR_HORIZONTAL, + RR_SURFACE_MIRROR_HORIZONTAL } RrSurfaceColorType; typedef enum { -- cgit v1.2.3