1
0
Fork 0
Commit graph

24 commits

Author SHA1 Message Date
Søren Sandmann
a1324af018 Move duplicated window field outside the union
Thu May 25 15:56:43 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/effects.h (struct MetaEffect): Move duplicated window field
        outside the union

        * src/compositor.c: delete duplicated code to get at the window.
2006-05-25 19:59:20 +00:00
Adam Jackson
76dff49a3e Bounce on window focus. 2006-05-25 14:40:50 +00:00
Adam Jackson
22bc36eb3b Move shrink effect code from compositor.c to c-window.c. Stubs for
restore effect.  Notes in various places for where to hook in
other effects.
2006-05-23 21:42:34 +00:00
Søren Sandmann
7592470dab Also use explode when windows close.
Tue May 23 16:36:04 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (do_effect): Also use explode when windows close.

        * src/c-window.c (meta_comp_window_explode): Add refcounting to
        comp window, and use it in the explosion effect

        * src/effects.h (struct MetaEffect): Add new MetaCloseEffect.

        * src/display.c (event_callback): Run it from the UnmapNotify
        event handler.
2006-05-23 20:38:18 +00:00
Søren Sandmann
3e5b9776c6 Beginning of new layer that abstracts transition effects.
Mon May 22 17:35:52 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/effects.[ch]: Beginning of new layer that abstracts
	transition effects.

	New functions:
	(meta_push_effect_handler): Install an effect handler
	(meta_pop_effect_handler): Remove last effect handler
	(meta_effect_run_minimize): Create a minimize effect and pass it
	to the handler.
	(meta_effect_end): Called by handler when the effect is finished.

	* src/compositor.c: Move explosion code form there to src/c-window.c.

	* src/c-screen.c: Delete explosion related code.
2006-05-22 21:46:14 +00:00
Ray Strode
2972ab6df6 Improve the behavior of keyboard move/resize and edge snapping. Still not
2005-08-03  Ray Strode  <rstrode@redhat.com>

	Improve the behavior of keyboard move/resize and edge
	snapping.  Still not perfect, bug 310888.

	* src/effects.c (draw_xor_rect): Make the outside of a
	wireframe rectangle line up with the outside edge of its
	window, instead of centering the wireframe edges on the
	window edges.

	* src/keybindings.c (process_keyboard_move_grab): allow
	edge snapping in wireframe mode.  Adjust code to take
	into account changed semantics of find_next_*_edge
	functions.
	(process_keyboard_resize_grab_op_change): new function
	to take some orthogonal logic out of
	process_keyboard_resize_grab_op.  Only allow keyboard
	resize cursor to go to flat edges, not corners.
	(process_keyboard_resize_grab):  allow edge snapping in
	wireframe mode.  Fix up snapping logic.

	* src/place.c (get_{vertical,horizontal}_edges): use
	GArray instead of int *, since the number of output
	edges isn't known until the middle of the function now.
	Use xor rect extents instead of window extends if in
	wireframe mode.
	(meta_window_find_next_{vertical,horizontal}_edge: add
	new source_edge_position parameter to specify which edge
	on the active window to start from when looking for next
	edge on the screen. Return the coordinate of the edge
	found and not the coordinate of where the window should be
	moved to snap to where the edge was found.

	* src/window.c (update_move): all the user to specify
	an edge to resize with mouse in keyboard resize mode.
	window
2005-08-03 02:22:00 +00:00
Ray Strode
064a86e620 Cleanup font data when done with it (bug 306720).
2005-06-07  Ray Strode  <rstrode@redhat.com>

	Cleanup font data when done with it (bug 306720).

	* src/effects.c (draw_xor_rect): free font info structure.
	* src/screen.c (meta_screen_new): pass a 1 not a 0 to
	XFreeFontInfo to free font info structure.
	(meta_screen_free): call XUnloadFont on GC font before freeing
	the GC.
2005-06-07 15:52:56 +00:00
Ray Strode
14b8de3727 Bug 305564 again.
2005-05-30  Ray Strode  <rstrode@redhat.com>

	Bug 305564 again.

	When drawing XOR resize popup use "fixed" font instead of
	-misc-fixed-*-16-* xlfd.  Should work on more xservers.

	Also take steps to fail better if the xserver isn't
	cooperating.

	* src/effects.c (draw_xor_rect): if we can't draw font box
	for whatever reason, at least draw grid frames.

	* src/screen.c (meta_screen_new): use fixed alias instead
	of a xfld.  Don't pass GCFont to XCreateGC if font couldn't
	be loaded.  Print a warning if font couldn't be loaded.
2005-05-30 20:15:26 +00:00
Ray Strode
7b416a0a2d Actually commit the stuff mentioned in the last ChangeLog entry.
2005-05-26  Ray Strode  <rstrode@redhat.com>

	Actually commit the stuff mentioned in the last
	ChangeLog entry.
2005-05-26 19:58:17 +00:00
Kjartan Maraas
43cc3b8606 A load of fixes of issues reported by sparse. Closes bug #152849
2004-09-17  Kjartan Maraas  <kmaraas@gnome.org>

	* src/bell.c: (meta_bell_flash_screen):
	* src/compositor.c:
	* src/effects.c: (meta_effects_draw_box_animation):
	* src/fixedtip.c: (meta_fixed_tip_show):
	* src/frame.c: (find_argb_visual):
	* src/frames.c: (unsigned_long_hash), (meta_frames_manage_window),
	(meta_frames_apply_shapes):
	* src/iconcache.c: (find_largest_sizes), (find_best_size):
	* src/keybindings.c: (meta_spawn_command_line_async_on_screen):
	* src/main.c: (main):
	* src/menu.c: (meta_window_menu_new):
	* src/prefs.c: (meta_prefs_get_visual_bell),
	(meta_prefs_bell_is_audible), (meta_prefs_get_visual_bell_type),
	(meta_prefs_get_action_double_click_titlebar),
	(meta_prefs_get_auto_raise), (meta_prefs_get_auto_raise_delay),
	(meta_prefs_get_reduced_resources):
	* src/screen.c: (meta_create_offscreen_window):
	* src/tabpopup.c: (meta_ui_tab_popup_get_selected):
	* src/theme-parser.c: (meta_theme_load):
	* src/theme.c: (meta_gtk_widget_get_font_desc):
	* src/tools/metacity-mag.c: (mouse_press), (begin_area_grab):
	* src/util.c: (meta_unsigned_long_hash): A load of fixes of issues
	reported by sparse. Closes bug #152849
2004-09-16 23:18:22 +00:00
Soeren Sandmann
766d46b70d New function. Use it here to synchronize with the hardware between each
Mon Aug  9 05:38:33 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/effects.c (graphics_sync): New function.
	* src/effects.c (effects_draw_box_animation_timeout): Use it here
	to synchronize with the hardware between each frame.
2004-08-09 03:40:37 +00:00
Havoc Pennington
e98fad3e62 Merge reduced_resources mode patch from the branch. Offers wireframe and
2003-10-12  Havoc Pennington  <hp@redhat.com>

        Merge reduced_resources mode patch from the branch. Offers
	wireframe and no-animations.

	* src/window.c (implement_showing): no animation if we are
	in reduced resources mode

	* src/prefs.c: add REDUCED_RESOURCES pref

	* src/window.c (meta_window_update_keyboard_resize): fix to
	modify grab_anchor_window_pos to grab_wireframe_rect if
	appropriate instead of window->rect

	* src/display.h (struct _MetaDisplay): add grab_start_serial used
	to avoid responding to events that occurred prior to the grab
	initialization.

	Still broken in various ways, specifically EnterNotify that
	occurred prior to XGrabPointer is processed as if it occurred
	after.

	* src/window.c (meta_window_update_keyboard_move): add this
	instead of meta_window_warp_pointer() crack

	* src/effects.c (meta_effects_update_wireframe): draw a kind of
	grid for the wireframe, instead of just a rectangle, like twm

	* src/screen.c (meta_screen_new): line width of 3 for the XOR gc

        "Reduced resources" mode based on wireframe patch from
	Erwann Chenede. Still pretty buggy.

	* src/keybindings.c (process_keyboard_move_grab)
	(process_keyboard_resize_grab): add gruesome wireframe hacks

	* src/display.c (meta_display_end_grab_op): end wireframe
	(meta_display_begin_grab_op): begin wireframe

	* src/effects.c (meta_effects_end_wireframe)
	(meta_effects_update_wireframe, meta_effects_begin_wireframe):
	routines to draw the wireframe stuff

	* src/window.c (window_should_be_showing): hide window when
	doing wireframe, commented out as it breaks grab
	* src/window.c (meta_window_refresh_resize_popup): handle wireframe

	* src/screen.c (meta_screen_new): create a screen->root_xor_gc
	for use in drawing wireframes

	* src/frames.c (meta_frames_push_delay_exposes): repaint
	everything before we delay
2003-10-12 06:25:38 +00:00
Havoc Pennington
70b6a57003 call meta_image_window_new in multihead-safe way
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/effects.c (meta_effects_draw_box_animation): call
	meta_image_window_new in multihead-safe way

	* src/ui.c (meta_image_window_new): multihead safety
2002-10-18 22:46:37 +00:00
Havoc Pennington
00dcef82e3 disable animation when shading windows, just doesn't really convey the
2002-07-28  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_shade): disable animation when shading
	windows, just doesn't really convey the idea anyway.

	* src/effects.c: Move to using a shaped window instead of
	IncludeInferiors to do the animations, looks a lot better
	because we don't have to grab the server.

	* src/window.c (meta_window_change_workspace): remove bogus
	assertion that was causing a crash
	(meta_window_new): auto-fullscreen huge undecorated windows.

	* src/keybindings.c (switch_to_workspace): use
	meta_window_change_workspace() to avoid same bug in cut-and-paste
	code from there
2002-08-06 04:11:23 +00:00
Havoc Pennington
d443d92446 Work on opaque animations more, still suck too much to turn on. Not sure
2002-03-05  Havoc Pennington  <hp@pobox.com>

        Work on opaque animations more, still suck too much
	to turn on. Not sure how to make them good.

	* src/effects.c (meta_effects_draw_box_animation):
	add a slide-up mode for shading

	* src/ui.c (meta_image_window_set): change image window to work by
	setting back pixmap on the GtkWindow, instead of using GtkImage.
2002-03-05 05:05:00 +00:00
Havoc Pennington
f70993be97 add prototype thingy to display windows we're cycling through with tab.
2001-08-19  Havoc Pennington  <hp@pobox.com>

	* src/tabpopup.c: add prototype thingy to display windows we're
	cycling through with tab. Not wired up to keybindings yet.
2001-08-19 06:23:59 +00:00
Havoc Pennington
9acaa50f59 oops, accidentally turned on opaque iconify 2001-08-19 02:00:26 +00:00
Havoc Pennington
60f531af35 also set the current size. Lame hack of the day.
2001-08-18  Havoc Pennington  <hp@pobox.com>

	* src/ui.c (meta_image_window_set_position): also set the current
	size. Lame hack of the day.

	* src/effects.c (effects_draw_box_animation_timeout): use the
	delay exposes feature to avoid the scren dirt

	* src/ui.c
	(meta_ui_push_delay_exposes):
	(meta_ui_pop_delay_exposes): feature to let us delay redraws until
	after we do server-grabbed draw-on-inferiors effects
2001-08-19 01:58:00 +00:00
Havoc Pennington
246ac5e578 use the delay exposes feature to avoid the scren dirt
2001-08-18  Havoc Pennington  <hp@pobox.com>

	* src/effects.c (effects_draw_box_animation_timeout): use the
	delay exposes feature to avoid the scren dirt

	* src/ui.c (meta_image_window_set_position): use gtk_window_move()
	to set the position
	(meta_ui_push_delay_exposes):
	(meta_ui_pop_delay_exposes): feature to let us delay redraws until
	after we do server-grabbed draw-on-inferiors effects
2001-08-19 01:19:54 +00:00
Havoc Pennington
d6bf2f5e80 disable opaque animations by default, current implementation suXors.
2001-08-06  Havoc Pennington  <hp@redhat.com>

	* src/effects.c: disable opaque animations by default, current
	implementation suXors.
2001-08-06 18:28:51 +00:00
Havoc Pennington
8c7b04edb9 Get start time after we do the pixbuf from drawable, so we don't count
2001-08-06  Havoc Pennington  <hp@pobox.com>

	* src/effects.c (meta_effects_draw_box_animation): Get start
	time after we do the pixbuf from drawable, so we don't count
	time spent getting pixbuf from drawable in the animation time.
2001-08-06 08:03:48 +00:00
Havoc Pennington
11b14d327f add opaque minimize/shade feature. The wireframe seemed kind of confusing
2001-08-06  Havoc Pennington  <hp@pobox.com>

	* src/effects.c: add opaque minimize/shade feature.  The wireframe
	seemed kind of confusing and unclear from a UI standpoint.
	I know, I know. The bloat begins here.

	Also, we don't need to grab the server during opaque min/shade,
	which has some nice implications.

	* src/ui.c: Add features to render a window with an image in it,
	and also wrap pixbuf_from_drawable

	* src/effects.c (meta_effects_draw_box_animation):
	modify to be smoother (at least theoretically) by
	syncing to current time and "dropping frames"
	as appropriate.

	* src/window.c (meta_window_shade): draw animation
	for shading too
2001-08-06 07:58:49 +00:00
Havoc Pennington
d8561cb4c3 modify to be smoother (at least theoretically) by syncing to current time
2001-08-06  Havoc Pennington  <hp@pobox.com>

	* src/effects.c (meta_effects_draw_box_animation):
	modify to be smoother (at least theoretically) by
	syncing to current time and "dropping frames"
	as appropriate. A precursor to flashier animations
	that take more CPU to do.

	* src/window.c (meta_window_shade): draw animation
	for shading too
2001-08-06 05:12:22 +00:00
Anders Carlsson
971419c880 Add _NET_WM_ICON_GEOMETRY atom.
2001-08-05  Anders Carlsson  <andersca@gnu.org>

	* src/display.h, src/display.c: Add _NET_WM_ICON_GEOMETRY atom.

	* src/window.c (meta_window_calc_showing): See if the window has
	an icon geometry and show a morphing animation from the window's
	coordinates to the icon's coordinates.
	(meta_window_get_icon_geometry): New function that fetches a
	window's icon geometry.

	* src/Makefile.am: Add effects.[ch].

        * src/effects.c: New file with cool effects.
2001-08-05 16:04:52 +00:00