2002-12-08 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_fill_vertical)
(meta_window_fill_horizontal): new functions to resize to
fill screen
* src/keybindings.c: add vert, horiz maximize
* src/prefs.c: had vert, horiz maximize
* src/metacity.schemas.in: shorten some overlong short
descriptions that make the keybindings capplet look ugly.
Add maximize_vertically, maximize_horizontally keys.
2002-12-08 Havoc Pennington <hp@pobox.com>
* src/prefs.c (meta_prefs_get_application_based): make this always
return FALSE for now, to avoid bug reports.
* src/util.c (ensure_logfile): put "opened log file" message on
stderr so it will normally land in ~/.xsession-errors
* configure.in: remove extra AC_ARG_PROGRAM
* src/display.c (event_callback): handle the toggle-verbose message
* src/tools/metacity-message.c: add a toggle-verbose message, been
meaning to do this for a while.
* src/util.c (meta_set_verbose): if verbose mode is enabled and we
don't support it, then exit.
* src/prefs.c: allow building without gconf (currently means some
prefs are no-ops)
* src/util.c, src/util.h: support defining macros to
kill all verbose output entirely. (Removes the code and strings
associated with it)
* configure.in: don't get METACITY_PROPS_LIBS if not building the
config dialog.
(HAVE_GCONF): allow building sans gconf, if you are size-sensitive
and not using gnome.
(WITH_VERBOSE_MODE): add ability to disable all the verbose debug
spew strings, to shrink the binary.
(--disable-sm): allow SM support to be forced on or off
(--disable-startup-notification): allow forcing this on or off
2002-11-19 Havoc Pennington <hp@pobox.com>
Should really fix#98303
* src/prefs.c (meta_prefs_change_workspace_name): add
bad hack to treat empty string the same as null
* src/menu.c (get_workspace_name_with_accel): allocate one more
than the length of "name" so we have room for a nul byte (and
don't malloc(0) on empty strings). Also some formatting cleanups.
2002-11-19 Havoc Pennington <hp@pobox.com>
Fix#98303 and assorted cleanup
* src/prefs.c (meta_preference_to_string): handle
META_PREF_WORKSPACE_NAMES
* src/menu.c (get_workspace_name_with_accel): assert that the
workspace has a name
* src/screen.c (meta_screen_ensure_workspace_popup): assert that
we got a workspace name
(meta_screen_ensure_workspace_popup): assert that we got a
workspace name
* src/prefs.c (update_workspace_name): fix screwiness (strcmp with
a freed string, assorted bad logic)
(init_workspace_names): assert that we filled in a default
workspace name
(meta_prefs_get_workspace_name): assert non-NULL workspace name
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_get_name): new function,
and remove workspace->name field, instead just get the
name from prefs each time
* src/screen.c (meta_screen_update_workspace_names): update the
gconf key to persist workspace names here, instead of changing
the names we use
* src/util.c (topic_name): add META_DEBUG_PREFS
* src/prefs.c: change NUM_COMMANDS to 32 to allow more custom
commands, implement workspace names
* src/metacity.schemas.in: add workspace_names/name_NN gconf keys.
2002-10-18 Havoc Pennington <hp@redhat.com>
* src/keybindings.c (do_choose_window): don't start the cycle
process if the binding for switching windows has no modifier bits,
just focus the window immediately.
* src/prefs.c, src/keybindings.c: add a keybinding to move between
windows that goes in the opposite direction. This is mostly
useful if you want to bind unmodified keys to the switch windows
functions, e.g. if you have "Forward" and "Back" keys on your
keyboard. Patch from Shilad Sen <shilad sourcelight com>
2002-10-18 Havoc Pennington <hp@redhat.com>
* src/prefs.c, src/frames.c: add "what happens when you double
click the titlebar" setting, patch from Sean Middleditch bug
#95625. This is basically an "add Windows emulation mode" patch.
2002-10-12 Havoc Pennington <hp@pobox.com>
* src/metacity.schemas.in: button layout key
* src/prefs.c: Add button layout gconf key
(change_notify): use some "else if" instead of "if" where we
should have been
2002-10-07 Havoc Pennington <hp@redhat.com>
Add a modifier key preference for the Alt+click stuff.
Can be set to "disabled" as well.
* src/run-metacity.sh: load .Xmodmap in the Xnest if it exists
* src/display.c (meta_display_ungrab_window_buttons): ungrab
AnyModifier in case the modifier changed since we grabbed
(meta_display_open): rearrange code to use meta_display_close() to
mop up when we can't find any screens, avoiding the need to
keep the bail-out code in sync with meta_display_close.
* src/keybindings.c (devirtualize_modifiers): move this function
to a public place in display.c
* src/metacity.schemas.in: add setting for the modifier key
to use for Alt+left/middle/right click.
* src/prefs.c (update_binding): add a missing newline to a warning
(meta_prefs_get_mouse_button_mods): new function
* src/ui.c (meta_ui_parse_modifier): new function
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-26 Havoc Pennington <hp@pobox.com>
* src/menu.c (meta_window_menu_new): use MetaAccelLabel to display
accelerators for the menu items
* src/metaaccellabel.c: cut-and-paste GtkAccelLabel and port to
use virtual modifiers
* src/Makefile.am (metacity_SOURCES): add metaaccellabel.[hc]
* src/prefs.c (meta_prefs_get_window_binding): new function
* src/core.c (meta_core_get_menu_accelerator): new function
2002-08-15 Havoc Pennington <hp@pobox.com>
* src/window.c (recalc_window_features): leave has_fullscreen_func
set to TRUE if the window is screen sized and undecorated, even if
the window isn't resizable. idea from Christian - Manny Calavera -
Neumair
* src/keybindings.c (handle_toggle_fullscreen)
(handle_toggle_maximize): these disabled fullscreen/maximize if
the window wasn't resizable, should have used has_fullscreen_func
has_maximize_func instead.
2002-08-15 Havoc Pennington <hp@pobox.com>
* src/keybindings.c: implement raise/lower
* src/metacity.schemas.in: add raise/lower
* src/prefs.c: add "raise" and "lower" prefs to keybindings
* src/display.c (meta_display_set_grab_op_cursor): assert that
the screen arg is non-NULL in appropriate cases
2002-08-10 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (meta_display_process_key_event): filter out
key events that happen on popup menus etc.
* src/ui.c (meta_ui_window_is_widget): new function to check
whether a window belongs to a GtkWidget such as the popup menu
* src/prefs.c (change_notify): put in a no-op line for AIX
compiler, #84252
2002-07-13 Havoc Pennington <hp@pobox.com>
* src/keybindings.c: adapt to virtual modifiers
(meta_display_process_mapping_event): we need to reload the
binding tables now when the modmap changes.
* src/prefs.c (update_binding): parse virtual modifiers, not
plain modmask
* src/common.h (MetaVirtualModifer): new enum
* src/ui.c (meta_ui_parse_accelerator): use
egg_accelerator_parse_virtual()
* src/Makefile.am: add eggaccelerators.[hc] for the virtual
accelerator parsing function
2002-07-11 Havoc Pennington <hp@pobox.com>
* src/metacity-dialog.c (main): option to display error when a
command fails to run.
* src/keybindings.c (handle_run_command): run commands
in response to keybindings.
* src/prefs.c: add command keybinding stuff
* src/metacity.schemas.in: add keybindings for running commands,
and keys to store the commands themselves.
2002-07-06 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): put _NET_DESKTOP_NAMES in the
array of atom names, so desktop names might work and we don't read
uninitialized memory.
* src/main.c (main): add VERSION/timestamp verbose message.
* src/keybindings.c: implement cycle_windows cycle_panels
* src/metacity.schemas.in: add the cycle_windows cycle_panels
keybindings
* src/prefs.h (META_KEYBINDING_FOCUS_PREVIOUS): replace
FOCUS_PREVIOUS key binding with CYCLE_WINDOWS and CYCLE_PANELS
(not good names really, but I don't have ideas).
* src/common.h: add a grab op for alt+esc window cycling
2002-06-08 Havoc Pennington <hp@pobox.com>
Cleanups to workspace popup patch. Space before all parens
in a couple places.
* src/prefs.c (meta_prefs_get_keybinding_action): fix brace
indentation, and use while instead of for loop. Take a "mask"
argument to avoid ambiguity issues.
* src/keybindings.c (handle_workspace_switch): rename from
handle_workspace_forward since there's no directionality here
(handle_workspace_switch): add a FIXME about how screwed it is
that we need a window in order to do our grab. Should be able to
grab on a dummy window like no_focus_window or the root window.
(process_workspace_switch_grab): rename from tab_grab for clarity,
no tab involved here.
* src/common.h (enum): have only one grab op for all workspace
switching directions, instead of one for each.
2002-06-08 Havoc Pennington <hp@pobox.com>
Apply big patch from blackc@speakeasy.net adding a popup window
to the Ctrl+Alt+arrows shortcuts. #83940
2002-06-08 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_new): select key press/release on the
display->no_focus_window, another attempted fix for not getting
keybindings when no window is focused. Still doesn't seem to work
though. I don't get what's going wrong.
(meta_create_offscreen_window): new function, used instead of
XCreateSimpleWindow so we get override redirect offscreen windows.
2002-05-28 Havoc Pennington <hp@pobox.com>
Patch from Erwann Chenede for raise_or_lower keybinding
* src/display.c, src/common.h: POINT_IN_RECT moved to a common
location, removed from here
(meta_rectangle_intersect): move here and make it public
* src/prefs.c: add raise_or_lower keybinding
* src/stack.c (meta_stack_get_below, meta_stack_get_above): add an
arg to only get windows within the same layer
* src/keybindings.c (handle_raise_or_lower): add handling for a
"raise window if obscured, else lower" keybinding
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-05-05 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_unminimize): on unminimize, queue
calc_showing on all transients
(meta_window_activate): on activate, unminimize all a window's
ancestors, not just the window itself.
* src/workspace.c (set_work_area_hint): don't increment "tmp" by
16 unsigned long, increment by 4
* src/window.c (meta_window_free): if a window isn't minimized,
restore its WM_STATE to NormalState instead of IconicState,
since IconicState on initial window map means that the window
should be minimized.
* src/workspace.c (meta_workspace_invalidate_work_area): queue an
idle to recompute the work area hint.
(set_work_area_hint): we need 4*num_workspaces ints, not just
num_workspaces.
* src/screen.c (meta_screen_new): add work_area_idle field,
handle it on screen shutdown
* src/common.h (META_PRIORITY_PREFS_NOTIFY,
META_PRIORITY_WORK_AREA_HINT): define some idle priorities
* src/window.c (meta_window_calc_showing): hide windows if
their parent window is minimized
(meta_window_minimize): also queue_calc_showing on all
transients of the window being minimized
* src/place.c (constrain_placement): function to apply
placement-time-only constraints, such as "not off the left of the
screen"
(meta_window_place): put dialogs down a bit over their parent,
not right at the top.
(meta_window_place): when centering a dialog, center it
on the current xinerama screen, rather than the entire
screen.
* src/screen.c (meta_screen_get_current_xinerama): new function,
but not implemented
2002-04-30 Havoc Pennington <hp@pobox.com>
* src/window.c (recalc_window_features): don't try to decorate
toolbars.
* src/tools/metacity-window-demo.c: add menu and toolbar tests
* src/place.c (meta_window_place): only dialogs should be centered
over parent, not anything with transient for set.
* src/window.c (meta_window_configure_request): become more
fascist about window positioning if workarounds are disabled, and
less fascist if they are enabled.
* src/metacity.schemas: add a "disable_workarounds" option. Kind
of crack-smoking. But we just can't get all applications
fixed. And I need no-workarounds mode to monitor which apps are
broken and what needs fixing in specs.
* src/window.c (meta_window_configure_request): always allow
windows to resize themselves
* src/keybindings.c (reload_modmap): don't filter out Mode_switch,
apparently some people bind window manager shortcuts to that.
2002-04-28 Havoc Pennington <hp@pobox.com>
* README: remove caveats about keybindings
* src/metacity.schemas: add schemas for all the keybindings.
* src/window.c (meta_window_activate): if in "show desktop" mode
when a window is activated, leave show desktop mode. So e.g.
when you click on a task in the task list, show desktop mode
will be turned off.
* src/workspace.c (meta_workspace_get_neighbor): new function
that doesn't quite work yet (needs support for getting
workspace layout from the pager)
* src/prefs.c: keybindings stuff
* src/keybindings.c: make keybindings configurable
* src/ui.c (meta_ui_parse_accelerator): new function
2002-03-10 Havoc Pennington <hp@pobox.com>
* src/display.c (event_callback): support _NET_NUMBER_OF_DESKTOPS
message so you can change number of desktops with the pager
* src/prefs.c (meta_prefs_set_num_workspaces): new function
* src/display.c (meta_spew_event): print stacking aspects of
configure request
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-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-01-27 Havoc Pennington <hp@pobox.com>
* src/display.c (event_callback): make the check for whether to
eat focus click a lot more complicated
* src/window.c (meta_window_same_application): new function
* src/prefs.h, src/prefs.c: add application based pref
* src/metacity.schemas: add "application_based" setting to
give me a mode to fool with being application based,
without being unusable in the meantime. Yeah the crack flows
freely these days. Everyone knew it would happen.
2001-12-09 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_free): update number of
workspaces hint
* src/screen.c (update_num_workspaces): implement number of
workspaces setting
* src/window.c (meta_window_configure_request): honor configure
requests on windows of type NORMAL, but still be mean to those of
type DIALOG
* src/main.c (main): add more log domains to those we set a log
handler for, and only set warnings fatal in debug mode
* src/metacity.schemas: add number of workspaces setting
2001-12-09 Havoc Pennington <hp@pobox.com>
* src/main.c (main): move SM init a bit later in the process, and
init prefs
* src/session.c: fix no SM case (though I hardly know why I'm
bothering)
* src/main.c (main): call bindtextdomain
* src/util.h (_): actually call gettext
* configure.in: put in AM_GLIB_GNU_GETTEXT and gconf stuff
* src/prefs.c: Preferences - this marks the beginning of our doom.
None of them are actually implemented yet, but we monitor
some stuff from gconf.