2007-03-26 Josselin Mouette <joss@malsain.org>
* src/session.c (meta_session_init): if previous client ID
was supplied, use it in filename.
* src/session.c (set_clone_restart_commands): use --sm-client-id
in command line to restore session, not original file name.
* src/session.c (regenerate_save_file): generate filename using
client ID and not original file name.
* src/session.c (base_save_file): removed function.
Closes GNOME 407981, Debian 391287, Debian 315169.
svn path=/trunk/; revision=3125
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
2005-11-18 Elijah Newren <newren@gmail.com>
Merge of all the changes on the constraints_experiments branch.
This is just a summary, to get the full ChangeLog of those
changes (approx. 2000 lines):
cvs -q -z3 update -Pd -r constraints_experiments
cvs -q -z3 diff -pu -r CONSTRAINTS_EXPERIMENTS_BRANCHPOINT ChangeLog
Bugs fixed:
unfiled - constraints.c is overly complicated[1]
unfiled - constraints.c is not robust when all constraints
cannot simultaneously be met (constraints need to be
prioritized)
unfiled - keep-titlebar-onscreen constraint is decoration
unaware (since get_outermost_onscreen_positions()
forgets to include decorations)
unfiled - keyboard snap-moving and snap-resizing snap to hidden
edges
109553 - gravity w/ simultaneous move & resize doesn't work
113601 - maximize vertical and horizontal should toggle and be
constrained
122196 - windows show up under vertical panels
122670 - jerky/random resizing of window via keyboard[2]
124582 - keyboard and mouse snap-resizing and snap-moving
erroneously moves the window multidimensionally
136307 - don't allow apps to resize themselves off the screen
(*cough* filechooser *cough*)
142016, 143784 - windows should not span multiple xineramas
unless placed there by the user
143145 - clamp new windows to screensize and force them
onscreen, if they'll fit
144126 - Handle pathological strut lists sanely[3]
149867 - fixed aspect ratio windows are difficult to resize[4]
152898 - make screen edges consistent; allow easy slamming of
windows into the left, right, and bottom edges of the
screen too.
154706 - bouncing weirdness at screen edge with keyboard moving
or resizing
156699 - avoid struts when placing windows, if possible (nasty
a11y blocker)
302456 - dragging offscreen too restrictive
304857 - wireframe moving off the top of the screen is misleading
308521 - make uni-directional resizing easier with
alt-middle-drag and prevent the occasional super
annoying resize-the-wrong-side(s) behavior
312007 - snap-resize moves windows with a minimum size
constraint
312104 - resizing the top of a window can cause the bottom to
grow
319351 - don't instantly snap on mouse-move-snapping, remove
braindeadedness of having order of releasing shift and
releasing button press matter so much
[1] fixed in my opinion, anyway.
[2] Actually, it's not totally fixed--it's just annoying
instead of almost completely unusable. Matthias had a
suggestion that may fix the remainder of the problems (see
http://tinyurl.com/bwzuu).
[3] This bug was originally about not-quite-so-pathological
cases but was left open for the worse cases. The code from
the branch handles the remainder of the cases mentioned in
this bug.
[4] Actually, although it's far better there's still some minor
issues left: a slight drift that's only noticeable after
lots of resizing, and potential problems with partially
onscreen constraints due to not clearing any
fixed_directions flags (aspect ratio windows get resized in
both directions and thus aren't fixed in one of them)
New feature:
81704 - edge resistance for user move and resize operations;
in particular 3 different kinds of resistance are
implemented:
Pixel-Distance: window movement is resisted when it
aligns with an edge unless the movement is greater than
a threshold number of pixels
Timeout: window movement past an edge is prevented until
a certain amount of time has elapsed during the
operation since the first request to move it past that
edge
Keyboard-Buildup: when moving or resizing with the
keyboard, once a window is aligned with a certain edge
it cannot move past until the correct direction has
been pressed enough times (e.g. 2 or 3 times)
Major changes:
- constraints.c has been rewritten; very few lines of code from
the old version remain. There is a comment near the top of
the function explaining the basics of how the new framework
works. A more detailed explanation can be found in
doc/how-constraints-works.txt
- edge-resistance.[ch] are new files implementing edge-resistance.
- boxes.[ch] are new files containing low-level error-prone
functions used heavily in constraints.c and edge-resistance.c,
among various places throughout the code. testboxes.c
contains a thorough testsuite for the boxes.[ch] functions
compiled into a program, testboxes.
- meta_window_move_resize_internal() *must* be told the gravity
of the associated operation (if it's just a move operation,
the gravity will be ignored, but for resize and move+resize
the correct value is needed)
- the craziness of different values that
meta_window_move_resize_internal() accepts has been documented
in a large comment at the beginning of the function. It may
be possible to clean this up some, but until then things will
remain as they were before--caller beware.
- screen and xinerama usable areas (i.e. places not covered by
e.g. panels) are cached in the workspace now, as are the
screen and xinerama edges. These get updated with the
workarea in src/workspace.c:ensure_work_areas_validated()
2005-01-06 Elijah Newren <newren@gmail.com>
Make sure the save session dialog appears focused. Fixes#162983.
* src/session.c (warn_about_lame_clients_and_finish_inter): Get a
timestamp by explicit request from Xserver, since none is
available otherwise.
2004-12-22 Elijah Newren <newren@gmail.com>
Partially resolve the conflicting requirements of windows on
multiple workspaces and hidden being a global quantity for windows
(fixes bug 156182; the remainder of the work is bug 87531 and is a
libwnck issue)
* src/display.c (event_callback):
* src/window.c (meta_window_visible_on_workspace, meta_window_unstick):
* src/workspace.c (meta_workspace_add_window,
meta_workspace_contains_window,
meta_workspace_queue_calc_showing):
* src/workspace.h:
Remove meta_workspace_contains_window, replace with simple
comparison utilizing window->workspace
* src/place.c (meta_window_place):
* src/window.c (meta_window_shares_some_workspace):
* src/window.h:
Remove meta_window_shares_some_workspace, replace with a simple
comparison utilizing window->workspace
* src/session.c (save_state),
* src/window.c (meta_window_new_with_attrs,
meta_window_apply_session_info, meta_window_free,
window_showing_on_its_workspace,
meta_window_change_workspace_without_transients,
meta_window_unstick, meta_window_set_current_workspace_hint,
meta_window_get_workspaces):
* src/window.h:
* src/workspace.c (meta_workspace_free, meta_workspace_add_window,
meta_workspace_remove_window):
Only one workspace now
2004-08-25 Elijah Newren <newren@math.utah.edu>
Make dialogs that Metacity shows follow focus-stealing-prevention
conventions. (fixes one issue in #149028; see comments 47-54)
* src/delete.c (delete_ping_reply_func,
delete_ping_timeout_func): Make callback functions take a
timestamp arg, (delete_ping_timeout_func): pass the timestamp to
metacity-dialog
* src/display.c (meta_display_ping_timeout): add a timestamp to
the call to the ping_timeout_func, (meta_display_ping_window,
process_pong_message): add a timestamp to the call to the
ping_reply_func
* src/display.h (MetaWindowPingFunc typedef): add a timestamp to
this function typedef
* src/keybindings.c (error_on_command): require a timestamp and
pass the timestamp on to metacity-dialog, (handle_run_command):
pass a timestamp to error_on_command
* src/metacity-dialog.c (copy_of_gdk_x11_window_set_user_time):
new function (temporary; only for use while using gtk+-2.4),
(kill_window_question, warn_about_no_sm_support,
error_about_command): make these functions take a timestamp and
call copy_of_gdk_x11_window_set_user_time, (main): require the
first two args to the program to be "--timestamp <timestamp>"
* src/session.c (warn_about_lame_clients_and_finish_inter): pass a
timestamp of 0 to metacity-dialog to prevent focus (it's a popup
not generated by and kind of user request).
2004-06-24 Elijah Newren <newren@math.utah.edu>
* src/session.c: Change meta_warning to meta_topic on failure to
connect to a session manager. Fixes#136218.
2002-10-16 Havoc Pennington <hp@redhat.com>
* src/workspace.c: workspaces are all per-screen now, fix
accordingly
* src/core.c: fix multihead workspace stuff
* src/keybindings.c: multihead-rama
* src/screen.c (meta_screen_show_desktop): new functions to
replace display equivalents
* src/display.c (meta_display_get_workspace_by_screen_index): get
rid of this
(meta_display_get_workspace_by_index): get rid of this
(event_callback): handle _NET_SHOWING_DESKTOP message per-screen
* src/screen.c (meta_screen_get_workspace_by_index): new function
* src/screen.h (struct _MetaScreen): move workspace list, and
showing_desktop flag, to be per-screen
* src/window.c (window_query_root_pointer): return whether pointer
is on window's screen
(meta_window_handle_mouse_grab_op_event): don't use coordinates
from other screens when updating a window operation on the current
screen. I can't believe no one has reported this...
2002-09-15 Havoc Pennington <hp@pobox.com>
* src/session.c (save_state): escape the window title before
saving in the session file, reported by Jos Vos
2002-08-01 Mark McLoughlin <mark@skynet.ie>
* src/session.c:
(save_yourself_possibly_done): send a SaveYourselfDone
if we're skipping this global save.
(save_yourself_callback): don't not save session state
if the save style is Global. Fixes#89390.
* theme-format.txt: update.
2002-07-12 Havoc Pennington <hp@pobox.com>
* src/session.c (warn_about_lame_clients_and_finish_interact):
don't display the dialog if all the apps were session managed.
2002-06-22 Havoc Pennington <hp@pobox.com>
Partially fix Jacob's SM bugs.
* src/window.c (meta_window_apply_session_info): restore the extra
stuff we're saving, except stack position I didn't figure out yet.
* src/session.c: save stack position, minimized, maximized,
in the session file.
2002-06-08 Havoc Pennington <hp@pobox.com>
* src/main.c (main): call meta_session_shutdown when exiting
cleanly
* src/session.c (meta_session_shutdown): function to change use to
RestartIfRunning
(meta_session_init): change normal restart hint to
RestartImmediately
2002-05-29 Havoc Pennington <hp@pobox.com>
* src/session.c (meta_session_init): improve error about failing
to open session manager.
(shutdown_cancelled_callback): send SmcSaveYourselfDone when we
get cancelled
(interact_callback): implement an interact callback that complains
about lame clients that can't be saved. Still somewhat buggy
in that it sends InteractDone before the user has closed the
dialog.
2002-04-25 jacob berkman <jacob@ximian.com>
* src/session.c (load_state): g_file_get_contents() takes a gsize
not int (fixes bus error on 64-bit platforms)
2002-03-17 Havoc Pennington <hp@pobox.com>
* src/session.c (set_clone_restart_commands): use proper property
name for SmDiscardCommand (instead of setting the clone command to
"rm"). Also fix typo that iterated over clonev not discardv to
fill in prop list, and NULL-terminate discardv. #74584 from Kang
Jeong-Hee.
2002-03-13 Havoc Pennington <hp@pobox.com>
* src/session.c (meta_session_init): don't save a file here, only
in response to SaveYourself. Change the code to properly use a
unique state file for each SaveYourself. Totally, totally
untested.
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-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
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.
2001-10-14 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_new): take a window mapped at
fullscreen size/pos to desire maximization; once I add a
fullscreen state, will change to copy kwin and take this mapping
as a desire for fullscreen, but for now testing with maximization.
* src/window.h: remove fullscreen window type, now proposing it
as a window state instead.
2001-10-14 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_maximize): always raise windows on
maximize
(meta_window_client_message): when activating a window, move
it to current workspace, instead of moving user to the
window's workspace.
2001-10-04 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (meta_change_keygrab): add code to grab all
modifier combinations, so keybindings work with NumLock etc.
* src/menu.c (meta_window_menu_new): remove newlines from menu
items
2001-09-27 Havoc Pennington <hp@pobox.com>
* src/session.c (save_state): when encoding text for session file,
escape XML entities
2001-09-15 Havoc Pennington <hp@pobox.com>
* src/window.c: add support for a mini icon in the titlebar
(update_icon): re-enable support for _NET_WM_ICON
* src/session.c (save_state): add an ferror check when writing
session file