summaryrefslogtreecommitdiff
path: root/src/frames.c
AgeCommit message (Collapse)AuthorFilesLines
2002-09-04don't filter out prelight for unmaximize button. #83860Havoc Pennington1-11/+17
2002-09-03 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_update_prelit_control): don't filter out prelight for unmaximize button. #83860 (meta_frames_paint_to_drawable): handle unmaximize here as well
2002-08-20if in the title rect check for y <= TOP_RESIZE_HEIGHTHavoc Pennington1-59/+63
2002-08-20 Havoc Pennington <hp@redhat.com> * src/frames.c (get_control): if in the title rect check for y <= TOP_RESIZE_HEIGHT * src/display.c (meta_spew_event): put x/y coordinates in spew for enter/leave notify * src/frames.c (meta_frames_motion_notify_event): move cursor changing from here to update_prelit_control so it happens on enter notify as well (get_control): change test "y < TOP_RESIZE_HEIGHT" to "y <= TOP_RESIZE_HEIGHT" * src/Makefile.am (EXTRA_DIST): include .in files in EXTRA_DIST
2002-08-04init button states for the button backgroundsHavoc Pennington1-0/+14
2002-08-04 Havoc Pennington <hp@redhat.com> * src/frames.c (meta_frames_paint_to_drawable): init button states for the button backgrounds * src/themes/Atlanta/metacity-theme-1.xml: adapt to work correctly with button repositioning
2002-08-04raise/focus on click, even if the click was on the client area (this makesHavoc Pennington1-3/+6
2002-08-04 Havoc Pennington <hp@redhat.com> * src/frames.c (meta_frames_button_press_event): raise/focus on click, even if the click was on the client area (this makes Alt+button1 raise windows again, yay) * src/stack.c (compute_layer): put panels in the DOCK layer always (keep them on top of other windows). Still sloppy-focus raised with respect to other docks. * configure.in: remove -Wshadow for now as GTK headers make all kinds of noise with it.
2002-07-24look for themes in ~/.themes/NAME/metacity-1/ andHavoc Pennington1-2/+0
2002-07-24 Havoc Pennington <hp@redhat.com> * src/theme-parser.c (meta_theme_load): look for themes in ~/.themes/NAME/metacity-1/ and datadir/themes/NAME/metacity-1 instead of the old locations. * src/themes/Makefile.am: install themes to datadir/themes/NAME/metacity-1/ to match how GTK works, breaking third-party themes yet again! woot!
2002-07-24put Gorilla back in the buildHavoc Pennington1-4/+2
2002-07-23 Havoc Pennington <hp@redhat.com> * src/themes/Makefile.am (THEMES): put Gorilla back in the build * src/themes/Gorilla/metacity-theme-1.xml, src/themes/Crux/metacity-theme-1.xml: fixes from Sebastien Delestaing so that these themes work properly with different font sizes. * src/frames.c (get_control): patch from Balamurali Viswanathan for #81984 (resize titlebar from the top not the bottom)
2002-06-25s/gdk_get_default_display/gdk_display_get_default/Mark McLoughlin1-1/+1
2002-06-25 Mark McLoughlin <mark@skynet.ie> * src/fixedtip.c: (meta_fixed_tip_show): * src/frames.c: (meta_frames_new): * src/tabpopup.c: (meta_ui_tab_popup_new): s/gdk_get_default_display/gdk_display_get_default/ s/gdk_get_default_screen/gdk_screen_get_default/
2002-06-09don't raise/focus the window if minimize/close are clicked, patch fromHavoc Pennington1-1/+3
2002-06-09 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_button_press_event): don't raise/focus the window if minimize/close are clicked, patch from Gaute Lindkvist #75460
2002-06-02move the remove_listener to finalize instead of destroy, thanks to JayarajHavoc Pennington1-2/+2
2002-06-01 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_finalize): move the remove_listener to finalize instead of destroy, thanks to Jayaraj for tracking down the bug.
2002-05-31verbose-log on startup whether we were compiled with various extensionsHavoc Pennington1-1/+157
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-29Patch from Erwann Chenede for raise_or_lower keybindingHavoc Pennington1-6/+0
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-24fix for bugzilla bug #72314, filter out LeaveNotify caused by grabs whenJayaraj Rajappan1-26/+34
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-09DefaultScreen() returns the screen number not Screen*Havoc Pennington1-1/+18
2002-05-09 Havoc Pennington <hp@redhat.com> * src/frames.c (show_tip_now): DefaultScreen() returns the screen number not Screen* * src/frame.c (meta_frame_sync_to_window): immediately repaint frame whenever we resize it, if we're inside a grab operation. * src/frames.c (meta_frames_repaint_frame): new function * src/window.c (meta_window_new): initialize window's colormap (meta_window_notify_focus): install the colormap for a window when it gets focus, uninstall on unfocus. * src/window.h (struct _MetaWindow): store window's colormap * src/display.c (event_callback): note changes to window colormap * src/frame.c (EVENT_MASK): add ColormapChangeMask
2002-05-08Add multi-screen support. Also add patch by Erwann Chenede to makeAnders Carlsson1-3/+22
2002-05-08 Anders Carlsson <andersca@gnu.org> * configure.in: * src/display.c: (meta_display_open): * src/fixedtip.c: (meta_fixed_tip_show): * src/fixedtip.h: * src/frames.c: (meta_frames_new), (show_tip_now): * src/frames.h: * src/menu.c: (meta_window_menu_new): * src/ui.c: (meta_ui_new): Add multi-screen support. Also add patch by Erwann Chenede to make tooltips appear on the correct screen.
2002-05-07Fix atom name; it's _NET_SHOW_DESKTOP, not _NET_WM_SHOW_DESKTOP.Anders Carlsson1-1/+6
2002-05-07 Anders Carlsson <andersca@gnu.org> * src/display.c: (meta_display_open), (event_callback), (meta_display_update_show_desktop_hint): * src/display.h: * src/screen.c: (set_supported_hint): Fix atom name; it's _NET_SHOW_DESKTOP, not _NET_WM_SHOW_DESKTOP. * src/frames.c: (meta_frames_unmanage_window): Restore the mouse cursor to default when unmanaging a window.
2002-05-05chop out the portion of the region that's outside the screen.Havoc Pennington1-5/+39
2002-05-04 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_paint_to_drawable): chop out the portion of the region that's outside the screen. * src/core.c (meta_core_get_screen_size): new function (meta_core_get_frame_extents): new function
2002-05-05disable automatic GTK double buffering, since it resulted in giganticHavoc Pennington1-15/+55
2002-05-04 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_init): disable automatic GTK double buffering, since it resulted in gigantic backing pixmaps the size of the whole screen. (meta_frames_paint_to_drawable): change to take a region argument; punch the client area out of the expose region, then iterate over rectangles in the region and draw each, manually doing begin_paint_rect. Results in 4 long thin backing pixmaps per frame repaint, instead of one large backing pixmap. Suggested by Owen.
2002-03-06use hash_table_replace instead of g_hash_table_insertHavoc Pennington1-4/+4
2002-03-06 Havoc Pennington <hp@redhat.com> * src/frames.c (meta_frames_manage_window): use hash_table_replace instead of g_hash_table_insert * src/main.c (main): only enable verbose/debug if you set METACITY_VERBOSE/METACITY_DEBUG * src/util.c (ensure_logfile): only use a log file if METACITY_USE_LOGFILE is set * src/display.c (meta_display_for_x_display): add warning if MetaDisplay isn't found * src/window.c (meta_window_free): add an assertion that we successfully cleared the grab window
2002-02-15use the preview widget hereHavoc Pennington1-6/+28
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-12Set prelit_control to META_FRAME_CONTROL_NONE.Anders Carlsson1-4/+57
2002-02-12 Anders Carlsson <andersca@gnu.org> * src/frames.c (meta_frames_manage_window): Set prelit_control to META_FRAME_CONTROL_NONE. (meta_frames_update_prelit_control): New function for setting the prelit control. (meta_frames_paint_to_drawable): Set prelight state. (meta_frames_enter_notify_event): Update prelit control. (meta_frames_leave_notify_event): Likewise. (meta_frames_motion_notify_event): Likewise. * src/frames.h (struct _MetaUIFrame): add prelit_control.
2002-02-09try to make more error message strings the same, easier for translatorsHavoc Pennington1-26/+111
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-08Throughout: move to meta_topic rather than meta_verbose so metacity.logHavoc Pennington1-189/+2
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-07disable custom log handler and fatal mask for nowHavoc Pennington1-643/+96
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-27Only consider the bottom of the titlebar a resize control; I keepHavoc Pennington1-22/+35
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-27separate code to draw frame from the expose_event handler, so in principleHavoc Pennington1-34/+93
2002-01-27 Havoc Pennington <hp@pobox.com> * src/frames.c: separate code to draw frame from the expose_event handler, so in principle we can draw the frame to a pixmap, but this isn't used yet.
2002-01-19cheesy client with static bit gravity, used to test the below change.Havoc Pennington1-2/+27
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.
2002-01-19give priority to keeping NW corner onscreen rather than SE, if we need toHavoc Pennington1-290/+57
2002-01-18 Havoc Pennington <hp@pobox.com> * src/window.c (constrain_position): give priority to keeping NW corner onscreen rather than SE, if we need to shift the window to fit inside constraints * src/frames.c (meta_frames_get_geometry): don't depend on the current window size * src/theme.c: move geometry stuff in here, to be calculated as part of the theme * src/core.c (meta_core_get_client_size): new function to replace meta_core_get_frame_size() so we don't have weird cycles in the geometry calculation
2002-01-08add code to save ACLOCAL_FLAGSHavoc Pennington1-7/+7
2002-01-08 Havoc Pennington <hp@pobox.com> * configure.in (ACLOCAL): add code to save ACLOCAL_FLAGS * src/frames.c (meta_frames_expose_event): max dither * src/testgradient.c (render_simple): change dither mode to MAX to avoid banding * src/theme.c: lose the gradient cache, and put in some initial data types for the theme format
2002-01-07make gradient a bit more subtle (don't go to the full background, but to aHavoc Pennington1-2/+11
2002-01-07 Havoc Pennington <hp@redhat.com> * src/frames.c (meta_frames_expose_event): make gradient a bit more subtle (don't go to the full background, but to a blend of selection and background; put lighter color on top)
2002-01-06change to use spiffy gradient code.Havoc Pennington1-33/+34
2002-01-06 Havoc Pennington <hp@pobox.com> * src/theme.c (meta_theme_get_gradient): change to use spiffy gradient code. * src/gradient.c: copy lovely gradient code from WindowMaker, as usual Dan and Alfredo have very nice code
2002-01-06draw titlebar highlight with snazzy gradient that needs some tweaking toHavoc Pennington1-0/+26
2002-01-05 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_expose_event): draw titlebar highlight with snazzy gradient that needs some tweaking to be less dumb-looking * src/theme.c: replace old theme.[hc] contents with newer stuff that doesn't do anything
2002-01-06GTK 1.2 plug/socket clients still broken, don't know why.Havoc Pennington1-1/+1
2002-01-05 Havoc Pennington <hp@pobox.com> GTK 1.2 plug/socket clients still broken, don't know why. * src/screen.c (meta_screen_new): select focus change on root window, for debugging * src/display.c (event_callback): when unfocusing, use no_focus_window to hold the focus * src/display.h (struct _MetaDisplay): have a no_focus_window to hold the focus when we don't want to have anything focused. Then we can avoid confusing focusing-the-frame stuff. * src/window.c (meta_window_notify_focus): improve some debug spew (meta_window_notify_focus): add hack from WindowMaker to ignore focus in events with detail > NotifyNonlinearVirtual
2002-01-03focus top window when switching to a new workspaceHavoc Pennington1-0/+3
2002-01-03 Havoc Pennington <hp@pobox.com> * src/workspace.c (meta_workspace_activate): focus top window when switching to a new workspace * src/util.c (meta_topic): start putting verbose output in categories * src/window.c (meta_window_shade): focus frame after we queue the calc_showing so the maps/unmaps have already happened. * src/display.c (meta_display_get_current_time): add the "get time of current event" function and call it occasionally. * src/window.c (meta_window_free): if we have focus, call meta_screen_focus_top_window(). (meta_window_minimize): ditto (meta_window_delete): ditto * src/screen.c (meta_screen_ensure_tab_popup): fix memory leak - didn't free tab list (meta_screen_focus_top_window): new function to use when we unmap or unmanage a focused window * src/stack.c (meta_stack_get_default_focus_window): function used in meta_screen_focus_top_window
2001-12-09move SM init a bit later in the process, and init prefsHavoc Pennington1-0/+1
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-12-03add a dummy element to the enum so the signals array is not empty. (breaksLaszlo Peter1-0/+1
2001-12-03 Laszlo Peter <laca@ireland.sun.com> * src/frames.c: add a dummy element to the enum so the signals array is not empty. (breaks the build with Forte C) * src/window.c: s/__FUNCTION__/G_GNUC_FUNCTION/
2001-10-25use bg/fg not base/text for the window title area.Havoc Pennington1-3/+3
2001-10-24 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_expose_event): use bg/fg not base/text for the window title area.
2001-10-15raise/focus windows on left-click, seem to have broken that yesterdayHavoc Pennington1-0/+9
2001-10-14 Havoc Pennington <hp@pobox.com> * src/frames.c (meta_frames_button_press_event): raise/focus windows on left-click, seem to have broken that yesterday * src/keybindings.c, src/display.c, src/window.c: add keybinding to show/hide all normal windows (so you can see the desktop). Currently Ctrl+Alt+D, which I don't like, but yay.
2001-10-14only handle events here if the modmask from our button grab is active.Havoc Pennington1-3/+18
2001-10-14 Havoc Pennington <hp@pobox.com> * src/display.c (event_callback): only handle events here if the modmask from our button grab is active. i.e. only the Alt-click is handled here. * src/frames.c: add check for whether button presses are in the frame client area before handling them, so we don't weirdly let you move a frame by clicking in its client area if the client hasn't selected button press events.
2001-09-21Add inlinepixbufs.h so that it gets generated.Alex Graveley1-3/+7
2001-09-21 Alex Graveley <alex@ximian.com> * src/Makefile.am (metacity_SOURCES): Add inlinepixbufs.h so that it gets generated. * src/frames.c (meta_frames_style_set): Update for new opaque PangoFontMetrics.
2001-09-16add support for a mini icon in the titlebar (update_icon): re-enableHavoc Pennington1-2/+69
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
2001-09-11icon for unmaximizeHavoc Pennington1-56/+128
2001-09-10 Havoc Pennington <hp@pobox.com> * src/menu.c (meta_window_menu_new): icon for unmaximize * src/ui.c (meta_ui_init): fix call to XDisplayName * src/util.c: add missing header * src/frames.c: draw an unmaximize control if already maximized
2001-08-19use the delay exposes feature to avoid the scren dirtHavoc Pennington1-0/+47
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-07-26...rhp1-4/+3
2001-07-26...rhp1-508/+148
2001-07-11...rhp1-1/+5
2001-07-05...rhp1-10/+16
2001-07-04...rhp1-17/+22
2001-07-04...rhp1-23/+54
2001-07-03...rhp1-122/+337
2001-06-30...rhp1-634/+325