2002-11-04 Havoc Pennington <hp@pobox.com>
* src/theme.c (scale_and_alpha_pixbuf): fix bug I introduced in
case where scaling was done in both directions.
2002-11-04 Havoc Pennington <hp@pobox.com>
Patch from Brian Cameron to implement the vertical/horizontal
striped image accelerated scaling from the gtk pixbuf engine.
* src/theme.c (scale_and_alpha_pixbuf): if an image is
vertical/horizontal stripes, use special extra-fast scaling
routines.
* src/theme-parser.c (parse_draw_op_element): when loading an
image, mark it as vertically/horizontally striped when appropriate
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/theme.c (meta_frame_layout_calc_geometry): fix from Garrett
LeSage for which button backgrounds we draw when
2002-10-24 Havoc Pennington <hp@redhat.com>
* src/theme.c (meta_frame_layout_calc_geometry): if only one
right-corner button, use right_right_background not
right_left_background
2002-10-03 Havoc Pennington <hp@pobox.com>
* src/themes/Esco/metacity-theme-1.xml: only specify the
middle backgrounds, let left/right fall back to middle
* src/theme.c (get_button): fall back to middle_background draw
routines when missing the left/right button backgrounds.
(button_rect): fix to handle drawing middle button backgrounds
(meta_frame_style_draw): draw middle background once per middle
button
2002-10-03 Havoc Pennington <hp@pobox.com>
Button-reordering patch. Has all the code except actually
installing a gconf schema and reading the gconf key in prefs.c.
metacity-theme-viewer displays the button layouts for testing
themes.
* src/preview-widget.c (meta_preview_size_request): make up a
width/height if no child widget
* src/prefs.c (meta_prefs_get_button_layout): new function
* src/frames.c: get the button layout from prefs and
use it when drawing
* src/theme.c (meta_frame_layout_calc_geometry): enhance to be
able to lay out buttons in different arrangements
(button_rect): draw the new button background rectangles
(meta_theme_draw_frame): require a button layout argument
(meta_theme_calc_geometry): pass in the button layout
* src/preview-widget.h: mod to handle button layouts
* src/theme-viewer.c: mod to handle button layouts
2002-09-24 Havoc Pennington <hp@redhat.com>
* src/main.c (main): support --version, #92796 patch from
Christian Neumair
* autogen.sh: change gettext test to be happy with
glib-gettextize, #81425
* src/menu.c: change mnemonics to match bug #78999
* src/theme.c (meta_theme_validate): consolidate some
nearly-identical themes for ease of translation, #70962
2002-08-24 Havoc Pennington <hp@redhat.com>
* src/window.c (update_sm_hints): hack around bug in kmail etc.
where SM_CLIENT_ID was set on the window, not the client leader.
* src/theme.c (meta_frame_layout_calc_geometry): don't round
corners unless we have enough frame to chop off.
2002-08-10 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_free): be sure window is
mapped if we unmanage it and it's not withdrawn;
bug #90369
* src/screen.c (meta_screen_new): change string
s/override/replace/ bug #89077
* src/theme.c (scale_and_alpha_pixbuf): dump the
sometimes-use-NEAREST-instead-of-BILINEAR optimization,
bug #87489
2002-08-04 Havoc Pennington <hp@redhat.com>
* src/theme.c (free_menu_ops): use MetaMenuIconType not button
type for the size of the menu ops array
(meta_theme_define_int_constant): return TRUE on success (how the
heck did this ever work?)
(meta_theme_define_float_constant): return TRUE on success
(meta_frame_style_validate): allow the "positional" buttons to
be omitted for now.
* src/testgradient.c (render_multi): don't define N_COLORS twice
* src/theme-viewer.c (run_theme_benchmark): don't define
ITERATIONS twice
* src/theme.c (button_rect): handle new button types
(meta_button_type_to_string): update
(meta_button_type_from_string): update
* src/theme.h (enum): add button types for the 6 possible button
positions. No way to reposition buttons still but this will allow
themes to go ahead and support doing so.
2002-06-21 Havoc Pennington <hp@pobox.com>
Theme breakage! Themes have to implement "border" frames
now, see Atlanta for an example. Fixes#84285
* src/tools/metacity-window-demo.c (do_appwindow): add a
border-only window
* src/window.c (update_mwm_hints): read border only from the MWM
hints
* src/window.h (struct _MetaWindow): add border_only flag
* src/core.c (meta_core_get_frame_type): report border type if
required
* src/common.h (enum): add META_FRAME_TYPE_BORDER
2002-06-13 Anders Carlsson <andersca@gnu.org>
* src/theme.c (meta_frame_layout_calc_geometry): Set client height
as 0 when the window actually is shaded, not the other way around.
2002-06-12 Havoc Pennington <hp@redhat.com>
* src/theme.c (meta_frame_layout_calc_geometry): when a window is
shaded, don't include client height in the height calculation.
* src/workspace.c (meta_workspace_get_neighbor): apply fix from
Mads Villadsen for the Up arrow key, #84582
2002-06-08 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_get_xinerama_for_window):
short-circuit the "only one xinerama" case, and use outer rect of
window instead of window->rect, so we get root window coords.
* src/theme.c (meta_frame_layout_get_borders): if fullscreen all
frame edges are zero-width.
* src/frame.c (meta_frame_get_flags): init fullscreen flag.
* src/common.h (enum): add META_FRAME_FULLSCREEN frame flag
* src/place.c: fix up calls to meta_window_get_work_area
* src/window.c (meta_window_get_work_area): add an arg for whether
the work area is for the screen or the xinerama subscreen.
(constrain_position): fix up calls to meta_window_get_work_area
(constrain_size): ditto
* src/screen.c (meta_screen_new): add METACITY_DEBUG_XINERAMA
environment variable which simulates xinerama on a single head.
2002-06-05 Havoc Pennington <hp@pobox.com>
* src/theme.c (meta_color_spec_new_from_string): parse
"shade/foo/factor" as a color
(colorize_pixbuf): remove the unused hsv_to_rgb and vice-versa
stuff, add the gtk_style_shade stuff.
(meta_color_spec_render): render the shaded color spec
* src/theme.h (struct _MetaColorSpec): add "shade" mode to
MetaColorSpec.
2002-06-04 Gustavo Girldez <gustavo.giraldez@gmx.net>
* src/theme.c (draw_op_as_pixbuf): Use icon's instead of image's
fill_type when type is META_DRAW_ICON.
2002-06-03 Havoc Pennington <hp@pobox.com>
* src/themes/Esco/metacity-theme-1.xml: test button aspect ratio
instead of hardcoded button size, James feel free to revert if you
don't like it this way.
* src/theme-parser.c: parse the aspect_ratio element for button
aspect ratios.
* src/theme.h (struct _MetaFrameLayout): allow button sizes to be
given as an aspect ratio derived from the titlebar height,
instead of as a fixed size.
* src/theme.c (meta_frame_layout_validate): validate new button
sizing parameters
* src/theme.c (meta_frame_layout_calc_geometry): use new button
layout params
2002-05-31 Havoc Pennington <hp@redhat.com>
* src/theme.c: add MetaImageFillType and implement TILE in
addition to the existing SCALE
* src/theme.h (struct _MetaDrawOp): remove no-longer-used "alpha"
field
2002-05-31 Havoc Pennington <hp@redhat.com>
* src/theme.c (multiply_alpha): now just uses
meta_gradient_add_alpha
(draw_op_as_pixbuf): implement alpha gradients for tint, gradient,
and image draw ops, so I can implement garrett's stuff.
* src/gradient.c (meta_gradient_add_alpha): new function to
multiply the alpha channel of a pixbuf by an alpha gradient
2002-05-30 Havoc Pennington <hp@redhat.com>
* src/main.c (main): verbose-log on startup whether we were
compiled with various extensions
* src/display.c (meta_display_queue_retheme_all_windows): reapply
shape mask when changing themes, sucks to do it here though, makes
theme changing slower. Needs fixing.
* src/theme-parser.c (parse_toplevel_element): parse rounded
corner options to frame_geometry
* src/frames.c (meta_frames_apply_shapes): apply rounded corners
if requested by the theme
* configure.in (HAVE_SHAPE): check for shape extension
2002-05-23 Jayaraj Rajappan <jayaraj.rajappan@wipro.com>
* src/display.c (event_callback): fix for bugzilla bug #72314,
filter out LeaveNotify caused by grabs when in mouse focus mode.
2002-04-09 Havoc Pennington <hp@pobox.com>
* src/theme.c (multiply_alpha): fix alpha multiplication routine
to perhaps work correctly, reported by tigert. Also, be sure
we always copy the image if necessary before modifying the
alpha channel.
2002-02-14 Havoc Pennington <hp@pobox.com>
* src/theme-viewer.c: use the preview widget here
* src/preview-widget.h, src/preview-widget.c: make the theme
preview into a nice widget
* src/frames.c (meta_frames_ensure_layout): replace frame layout
if the frame style changes, this only ends up mattering if you
e.g. changed the font size for windows in a different state such
as maximized, which is crack, but the code may as well be correct
* src/theme.c (meta_theme_get_frame_style): new function so we can
detect an invalid cache of the PangoLayout in a frame
2002-02-13 Anders Carlsson <andersca@gnu.org>
* src/theme.c (meta_pango_font_desc_get_text_height): Use
pango_context_get_metrics instead of loading the font.
2002-02-09 Havoc Pennington <hp@pobox.com>
* src/theme.c (meta_theme_set_current): add a newline to an error
message
* src/themes/Gorilla: add Gorilla theme by Jakub Steiner ported to
metacity by Kenneth Christiansen
2002-02-09 Havoc Pennington <hp@pobox.com>
* src/theme.c (meta_draw_op_draw_with_env): implement wacky "tile"
draw op to lose some of the PNG files in Gorilla theme
* src/theme-parser.c: parse the tile primitive
2002-02-09 Havoc Pennington <hp@pobox.com>
* src/theme-parser.c: try to make more error message strings the
same, easier for translators
* src/theme.c (meta_draw_op_free): free color spec for line op
(meta_theme_free): free the integer_constants hash
* src/theme-parser.c (parse_boolean): move above first use
* src/theme-viewer.c: fixes for theme.h changes
* src/frames.c (queue_recalc_func): don't recreate layout
immediately, just save title text. should speed things up.
(meta_frames_set_title): just remove the layout here also,
and save title text.
* src/theme-parser.c (parse_toplevel_element): parse title_scale
attribute on frame_geometry
* src/theme.c: support setting the text size
* src/frames.c: support setting the text size
* theme-format.txt: updates
2002-02-09 Havoc Pennington <hp@pobox.com>
* src/themes/Atlanta/metacity-theme-1.xml: put in some kind of
distinctive frame for UTILITY, though it's ugly. Also put in the
borderless look for maximized windows.
* src/stack.c (compute_layer): put splash screen in the splash
layer
* src/stack.h (enum): create a splash screen layer
* src/place.c (meta_window_place): center splashscreen, and fix a
typo in the centering code
* src/window.c (recalc_window_features): disable most features on
splash screens
* src/screen.c (set_supported_hint): add UTILITY and SPLASHSCREEN
hints
* src/window.c: add UTILITY, SPLASHSCREEN implementation
* src/window.h (enum): add UTILITY, SPLASHSCREEN types
* src/theme-parser.c (parse_toplevel_element): parser support
for has_title attribute
* src/theme.c (meta_frame_layout_get_borders): handle a has_title
field in the layout, for utility windows that don't display a
title (would be better to be able to shrink the title text,
but that's kind of tricky to implement :-/)
2002-02-08 Anders Carlsson <andersca@gnu.org>
* src/theme.c (scale_and_alpha_pixbuf): If we're only
scaling horizontally or vertically, use GDK_INTERP_NEAREST.
2002-02-07 Havoc Pennington <hp@pobox.com>
Throughout: move to meta_topic rather than meta_verbose so
metacity.log can start being more useful
* src/util.h (enum): add more debug topics
* src/frames.c: clean up some cruft that caused warnings
2002-02-07 Havoc Pennington <hp@pobox.com>
* src/theme.c (colorize_pixbuf): use the intensity of the gray
pixel for both saturation and value, not just value.
2002-02-07 Havoc Pennington <hp@pobox.com>
* src/theme.c (colorize_pixbuf): get algorithm right (use HSV/RGB
conversion) at cost of making it a lot slower. It doesn't matter
anyhow with the cache, though.
2002-02-06 Havoc Pennington <hp@pobox.com>
* src/theme-viewer.c: benchmark theme on startup
* src/theme-parser.c (parse_draw_op_element): fix "colorize !=
NULL" to "colorize_spec != NULL" and free pixbuf on color spec
failure
* src/theme.c (colorize_pixbuf): minor reformatting, raise
function calls out of inner loop, clamp r/g/b values to uchar
range before assigning to uchar
(draw_op_as_pixbuf): cache the colorized pixbuf
(meta_draw_op_free): free the cache pixbuf
2002-02-07 Anders Carlsson <andersca@gnu.org>
* src/theme-parser.c: (parse_draw_op_element):
Add support for "colorize" image attribute.
* src/theme.c: (colorize_pixbuf):
New function that colorizes a pixbuf.
(pos_tokenize): Allow "\n" as a whitespace character.
(meta_draw_op_free): Free colorize_spec;
(draw_op_as_pixbuf): Colorize image if needed.
* src/theme.h: Add colorize_spec to struct.
2002-02-06 Havoc Pennington <hp@pobox.com>
* src/main.c (main): disable custom log handler and fatal mask for
now
* src/theme.c (meta_draw_op_list_draw):
Add META_DRAW_CLIP
* src/main.c: load theme, monitor current theme setting
* src/prefs.c: add "current theme" setting
* src/stack.c (meta_stack_free): don't try to free
last_root_children_stacked if it doesn't exist
* src/themewidget.c: pluggable GtkMisc subclass to use
for menu icons
* src/screen.c (meta_screen_manage_all_windows): fix
signed/unsigned warning
* src/frames.c: port to theme system
(meta_frames_style_set): chain up
* theme-format.txt: new file
* configure.in: add more compiler warnings
* src/theme.c: add various stuff needed to get theme parser
working. Remove the "spacer" concept from FrameLayout object.
Add draw op that references a draw op list.
* configure.in: require GTK 1.3.13
* src/Makefile.am: add theme-parser.[hc], implement loading a
theme
* src/theme.c: add "draw title" and "draw window icon" operations
(meta_draw_op_draw): put object_width/object_height in expression
environment before computing x/y. Handle out-of-memory when
creating pixbufs. Assorted other cleanups.
2002-02-02 Havoc Pennington <hp@pobox.com>
* src/theme-viewer.c: test % operator
* src/theme.c (pos_tokenize): add % to switch for operators
* src/theme.c: rework theme stuff so we have
MetaDrawOp/MetaDrawOpList instead of MetaTextureSpec/MetaShapeSpec
2002-01-27 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_set_syncing): move in here so util.c doesn't
require display.[hc]
* src/theme.h, src/theme.c: implement coordinate expression
parser, write MetaShapeSpec declaration
* src/util.c (meta_exit): move in here so we can link
to util.c with a different main()
* src/theme.h: rename the MetaWindow* enums to MetaFrame*
2002-01-27 Havoc Pennington <hp@pobox.com>
* src/frames.c (get_control): Only consider the bottom of the
titlebar a resize control; I keep accidentally resizing windows
instead of activating them. Also, give south resizing priority
over north, if the window is so small the active regions overlap
* src/theme.c: add MetaTheme, get MetaFrameStyleSet into
a usable state
* src/common.h: move window type back to window.h, decided
not to use it on frame side
(MetaFrameType): add this instead
2002-01-19 Havoc Pennington <hp@pobox.com>
* src/wm-tester/test-resizing.c: cheesy client with static
bit gravity, used to test the below change.
* src/window.c (meta_window_move_resize_internal): implement
Owen's proposal for window resizing.
http://mail.gnome.org/archives/wm-spec-list/1999-November/msg00088.html
Currently you have to do METACITY_USE_STATIC_GRAVITY=1 in order to
use it, because some GDK bug is screwing up exposes on my frames
when it's enabled.
* src/display.c (meta_display_create_x_cursor): fix glyph for
NE/NW cursors
* src/frames.c (get_control): add ability to resize from top
* src/frame.c (meta_frame_get_flags): can't resize shaded windows
(meta_frame_sync_to_window): add gravity arg
* src/common.h (MetaWindowType): move here from window.h so
it can be used in themes stuff.
(MetaFrameFlags): remove META_FRAME_TRANSIENT since it
overlaps with window type and was unused.