2007-01-27 Bruno Boaventura <brunobol@gnome.org>
* src/theme.c (kill_window_question): Fallback to NORMAL state after
checking for the middle button. Fixes bug #419043.
Patch from Benjamin Berg <benjamin@sipsolutions.net>.
svn path=/trunk/; revision=3140
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-01 Elijah Newren <newren gmail com>
* src/*.[ch]: Stick an emacs comment directive at the beginning of
all the code files so that people using emacs will be more likely
to get coding style correct in their patches. We still need a
similar vi directive. #358866
2006-09-12 Elijah Newren <newren gmail com>
* src/theme.c (meta_gtk_arrow_from_string,
meta_gtk_arrow_to_string): patch from Bruno Boaventura de Oliveira
to fix a compiler warning about not handling GTK_ARRROW_NONE.
#355490.
2006-08-07 Thomas Thurman <thomas@thurman.org.uk>
* src/frames.h: add new MetaButtonSpace struct; use it for
close_rect, max_rect, min_rect and menu_rect.
* src/frames.c (control_rect, get_control): modify to support
the new fields in MetaButtonSpace.
* src/theme.c (meta_frame_layout_get_borders, rect_for_function,
meta_frame_layout_calc_geometry, button_rect): add support for
the new fields in MetaButtonSpace.
2006-04-18 Björn Lindqvist <bjourne@gmail.com>
* makefile.am: Add boxes.{c,h} to libmetacity_private
* src/theme-parser.c (check_expression):
* src/theme-viewer.c (run_position_expression_tests):
Use meta_rect ().
* src/theme.c: Replace while loops iterating over sequences with
for loops.
* src/theme.c, src/theme.h (struct _MetaPositionExprEnv,
meta_draw_op_draw, meta_draw_op_list_draw,
meta_theme_draw_menu_icon): Use MetaRectangles in function
prototypes instead of x, y, with, height ints where applicable.
2006-03-27 Gora Mohanty <gmohanty@cvs.gnome.org>
* src/metacity.schemas.in:
* src/theme.c:
Changes strings to make them more readable, and more translatable.
Fixes#335720.
2006-01-21 Elijah Newren <newren gmail com>
Patch from Christian Kirbach to prevent a critical warning crasher
when switching themes. #327847.
* src/theme.c (meta_theme_free): since themes are only constructed
as needed and may be NULL, check for that before freeing theme
hash tables
2005-07-14 Elijah Newren <newren@gmail.com>
Patch from Ken Harris to provide a more lenient threshold for
drawing rounded corners. Fixes#122065.
* src/theme.c (meta_frame_layout_calc_geometry): use height +
width > 5 instead of height > 3 && width > 3 as criterion
2004-08-26 Havoc Pennington <hp@redhat.com>
* src/frame.c, src/theme.c: couple of cosmetic tweaks from
resolving my local patch with the bugzilla patch from the 8-19
entry below
2004-08-26 Havoc Pennington <hp@redhat.com>
* configure.in: move the have_xrender variable initialization up
in the file since it can be set as part of composite check
2004-08-19 Havoc Pennington <hp@redhat.com>
Fixes from Rich Wareham
* src/display.h (struct _MetaDisplay): add render extension check
to the display
* src/display.c: check for render
* configure.in: don't build compositing manager by default, don't
want any nasty surprises; check for render separately from
compositing manager
* src/frame.c: use an ARGB visual when available for the window
frame, so we can be all cool-ass
2004-01-09 Thomas Fitzsimmons <fitzsim@redhat.com>
Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.
* src/display.c: include xprops.h
(process_request_frame_extents): new function
(meta_display_open): add _NET_FRAME_EXTENTS and
_NET_REQUEST_FRAME_EXTENTS atoms
(event_callback): handle frame extents message
* src/display.h (struct _MetaDisplay): add atom_net_frame_extents
and atom_net_request_frame_extents
* src/theme.c (meta_pango_font_desc_get_text_height): make font_desc
parameter const
* src/ui.c: include prefs.h
(meta_ui_theme_get_frame_borders): new function
* src/window.c (update_net_frame_extents): new function
(meta_window_move_resize_internal): update frame extents
property when frame geometry changes
* src/screen.c (set_supported_hint): add atom_net_frame_extents
and atom_net_request_frame_extents
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