diff --git a/src/ui/ui.c b/src/ui/ui.c index 2fbaad993..dd52a0c57 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -211,47 +211,6 @@ meta_ui_window_should_not_cause_focus (Display *xdisplay, return FALSE; } -void -meta_ui_theme_get_frame_borders (MetaUI *ui, - MetaFrameType type, - MetaFrameFlags flags, - MetaFrameBorders *borders) -{ - GdkDisplay *display; - GdkScreen *screen; - int text_height; - MetaStyleInfo *style_info = NULL; - PangoContext *context; - const PangoFontDescription *font_desc; - PangoFontDescription *free_font_desc = NULL; - - display = gdk_x11_lookup_xdisplay (ui->xdisplay); - screen = gdk_display_get_default_screen (display); - - style_info = meta_theme_create_style_info (screen, NULL); - - context = gtk_widget_get_pango_context (GTK_WIDGET (ui->frames)); - font_desc = meta_prefs_get_titlebar_font (); - - if (!font_desc) - { - free_font_desc = meta_style_info_create_font_desc (style_info); - font_desc = (const PangoFontDescription *) free_font_desc; - } - - text_height = meta_pango_font_desc_get_text_height (font_desc, context); - - meta_theme_get_frame_borders (meta_theme_get_default (), - style_info, type, text_height, flags, - borders); - - if (free_font_desc) - pango_font_description_free (free_font_desc); - - if (style_info != NULL) - meta_style_info_unref (style_info); -} - gboolean meta_ui_window_is_widget (MetaUI *ui, Window xwindow) diff --git a/src/ui/ui.h b/src/ui/ui.h index e7a00e4e6..eb5cc9779 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -39,11 +39,6 @@ typedef gboolean (* MetaEventFunc) (XEvent *xevent, gpointer data); MetaUI *meta_ui_new (MetaX11Display *x11_display); void meta_ui_free (MetaUI *ui); -void meta_ui_theme_get_frame_borders (MetaUI *ui, - MetaFrameType type, - MetaFrameFlags flags, - MetaFrameBorders *borders); - MetaUIFrame * meta_ui_create_frame (MetaUI *ui, Display *xdisplay, MetaWindow *meta_window, diff --git a/src/x11/events.c b/src/x11/events.c index 639b3f580..6b3dee7c5 100644 --- a/src/x11/events.c +++ b/src/x11/events.c @@ -1055,35 +1055,9 @@ process_request_frame_extents (MetaX11Display *x11_display, Window xwindow = event->xclient.window; unsigned long data[4] = { 0, 0, 0, 0 }; - MotifWmHints *hints = NULL; - gboolean hints_set = FALSE; - - meta_verbose ("Setting frame extents for 0x%lx", xwindow); - - /* See if the window is decorated. */ - hints_set = meta_prop_get_motif_hints (x11_display, - xwindow, - x11_display->atom__MOTIF_WM_HINTS, - &hints); - if ((hints_set && hints->decorations) || !hints_set) - { - MetaFrameBorders borders; - - /* Return estimated frame extents for a normal window. */ - meta_ui_theme_get_frame_borders (x11_display->ui, - META_FRAME_TYPE_NORMAL, - 0, - &borders); - data[0] = borders.visible.left; - data[1] = borders.visible.right; - data[2] = borders.visible.top; - data[3] = borders.visible.bottom; - } - meta_topic (META_DEBUG_GEOMETRY, - "Setting _NET_FRAME_EXTENTS on unmanaged window 0x%lx " - "to top = %lu, left = %lu, bottom = %lu, right = %lu", - xwindow, data[0], data[1], data[2], data[3]); + "Setting _NET_FRAME_EXTENTS on unmanaged window 0x%lx", + xwindow); meta_x11_error_trap_push (x11_display); XChangeProperty (x11_display->xdisplay, xwindow, @@ -1091,8 +1065,6 @@ process_request_frame_extents (MetaX11Display *x11_display, XA_CARDINAL, 32, PropModeReplace, (guchar*) data, 4); meta_x11_error_trap_pop (x11_display); - - g_free (hints); } /* from fvwm2, Copyright Matthias Clasen, Dominik Vogt */