summaryrefslogtreecommitdiff
path: root/src/core/session.c
Commit message (Collapse)AuthorAgeFilesLines
* session: always finish interactionAlberts Muktupāvels2021-07-191-0/+5
| | | | | | | | | | | After commits 0b3f45bb1bf8 and db37deb589ea SmcInteractDone and SmcSaveYourselfDone is only called if zenity dialog exits with 0 code. Finish interaction also when dialog is closed by pressing Cancel indicating that shutdown should be canceled. https://gitlab.gnome.org/GNOME/metacity/-/issues/20
* session: remove redundant assignmentAlberts Muktupāvels2021-07-191-1/+0
|
* session: fix memory leakAlberts Muktupāvels2021-03-141-3/+1
| | | | Coverity CID: #1502682
* session: check fcntl return valueAlberts Muktupāvels2020-10-211-3/+8
| | | | | | This function can fail. CID 1220275.
* util: allow logging only specific debug topicsAlberts Muktupāvels2017-03-101-1/+1
| | | | | | | | | | | Replace existing METACITY_VERBOSE environment variable with META_DEBUG. This allows to log only specific topic or topics. This patch adds META_DEBUG_VERBOSE topic to log all meta_verbose messages, but in long term meta_verbose should be replaced with meta_topic. Use META_DEBUG=all to get same behaviour.
* main: remove MetaExitCode enumAlberts Muktupāvels2017-03-101-3/+2
|
* util: replace meta_bug with g_errorAlberts Muktupāvels2017-03-101-1/+1
|
* util: replace meta_warning with g_warningAlberts Muktupāvels2017-03-101-12/+11
|
* session: fix indentationAlberts Muktupāvels2017-02-281-10/+10
|
* window: add missing window typesAlberts Muktupāvels2017-02-281-0/+28
|
* meta_display_list_windows: exclude override-redirectOwen W. Taylor2017-02-261-2/+2
| | | | | | | | | | Don't include override-redirect windows in the list return by meta_display_list_windows(), since we almost never want to handle them when considering "all window" for the display. Add a separate meta_display_list_all_windows() that includes override-redirect windows. http://bugzilla.gnome.org/show_bug.cgi?id=582639
* display: replace active_screen and screens with screenAlberts Muktupāvels2017-01-081-1/+1
|
* session: fix build warningsAlberts Muktupāvels2015-09-201-36/+42
|
* remove trailing whitespaceAlberts Muktupāvels2014-10-051-130/+130
|
* Update meta_show_dialog for gtk's removal of --screenAlberts Muktupāvels2014-06-041-1/+1
| | | | | | | | gtk3 no longer has the --screen command-line argument, which metacity was passing to zenity. Use --display (with an explicitly-specified screen number) instead. Author: Dan Winship Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687938
* Updated FSF's addressDaniel Mustieles2014-01-231-3/+1
|
* Should set RestartStyleHint to RestartIfRunning when replacedOwen W. Taylor2011-01-251-8/+0
| | | | | | | | | | | | | | | | | | | | | This reverts most of commit abbd057eb967e6ab462ffe305f41b2b04d417b25; - It's fine to call meta_session_shutdown() after the display is closed, since it's talking over the ICE connection - We should not call warn_about_lame_clients_and_finish_interact() unless we are interacting with the window manager in a session save. However, the part of abbd057 that fixed accessing freed memory was fixing a real problem; this patches does the same thing in a simpler way by fixing an obvious type in meta_display_close() where it was NULL'ing out the local variable 'display' rather than the global variable 'the_display' and adding keeping the check in meta_finalize() that was added in abbd057. The order of calling meta_session_shutdown() and calling meta_display_close() is reverted back to the old order to make it clear that it's OK if the display way already closed previously.
* Don't warn about a missing session fileTomislav Vujec2010-05-021-2/+0
| | | | | | | | | | | | | | | When started without session related command line parameters (e.g. from gnome-session), metacity picks up client_id from the DESKTOP_AUTOSTART_ID environment variable. Unfortunately, there is no way to distinguish if this was passed from a config file, representing old saved session, or generated by gnome-session, therefore load_state is attempted in each case. If the client_id is generated, there will be no session file, and metacity will report a warning. Just remove the warning so that users won't always find a warning at the start of their .xsession-errors. https://bugzilla.gnome.org/show_bug.cgi?id=577576
* Don't call IceCloseConnection() behind libSM's backOwen W. Taylor2010-01-141-3/+7
| | | | | | | | | The ICE connection is opened by libSM; we can't just close it when we get an IOError on the ICE connection; instead call SmcCloseConnection() and mark the connection as closed. This will prevent a segfault if we exit out of the metacity main loop and get to meta_finalize(). https://bugzilla.gnome.org/show_bug.cgi?id=604867
* Fix handling of SIGCHLDDan Winship2009-11-201-16/+15
| | | | | | | | | | | | The commit that removed metacity-dialog added a global SIGCHLD handler that caused problems by (a) calling waitpid(-1) and thus breaking g_child_watch for everyone else, and (b) doing too much from a signal handler and sometimes causing deadlocks (bug 596200). This removes the global handler and has each zenity user create its own child watch to watch for exit. (It also fixes the window class of the zenity dialogs, so that meta_window_present_delete_dialog() will work again.)
* Use zenity for the session management dialogue that warns aboutThomas James Alexander Thurman2009-02-201-110/+32
| | | | | | | | | | | | | clueless clients, not metacity-dialog. This is the last change away from metacity-dialog and therefore closes #521914. * src/Makefile.am: * src/core/session.c: * src/core/util.c: * src/include/util.h: * src/ui/metacity-dialog.c (deleted): svn path=/trunk/; revision=4163
* Session must be saved before display close, and displayThomas James Alexander Thurman2009-02-111-0/+8
| | | | | | | | | | | | shouldn't close during shutdown if it's already closed. Can't believe we don't have a bug about this already... * src/core/display-private.h: * src/core/display.c: * src/core/main.c: * src/core/session.c: svn path=/trunk/; revision=4133
* An attempt to make life a little easier for our beloved translators; thisThomas Thurman2008-10-121-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | 2008-10-12 Thomas Thurman <tthurman@gnome.org> An attempt to make life a little easier for our beloved translators; this has the same behaviour as before, but removes over thirty translation strings. * src/core/session.c (start_element_handler): all "attribute not found on element" strings are identical * src/ui/theme-parser.c (locate_attributes): allow attribute names to be preceded with "!" (in the code) to show they're required. (parse_aspect_ratio, parse_distance, parse_toplevel_element, parse_style_element, parse_gradient_element, static, parse_border, parse_style_set_element, parse_draw_op_element): use the new "!" prefix for locate_attributes(), or in some cases just the identical constant, for generating this error. * src/ui/theme.c (check_state, meta_theme_validate): add translator comments * src/ui/resizepopup.c (update_size_window): add translator comments svn path=/trunk/; revision=3949
* src/include/frame.h src/include/display.h src/include/xprops.hIain Holmes2008-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-05-19 Iain Holmes <iain@gnome.org> * src/include/frame.h * src/include/display.h * src/include/xprops.h * src/include/compositor.h * src/include/types.h * src/include/window.h * src/include/errors.h * src/include/screen.h: New basic public API for compositor. * src/compositor/*: Separate the compositor out into its own separate directory and set it up for backends. Initial XRender backend. * src/core/compositor.[ch]: Remove * src/core/frame.h * src/core/screen.h * src/core/display.h * src/core/window.h: Rename to -private.h so as not to clash with the new files in include * src/core/delete.c * src/core/workspace.h * src/core/stack.[ch] * src/core/keybindings.[ch] * src/core/errors.c * src/core/effects.[ch] * src/core/core.c * src/core/group.h * src/core/edge-resistance.[ch] * src/core/window-props.[ch] * src/core/constraints.h * src/core/bell.[ch] * src/core/iconcache.h * src/core/session.[ch] * src/core/main.c * src/core/place.h * src/core/xprops.c * src/ui/tabpopup.c: Use the new -private headers * src/core/display.c * src/core/frame.c * src/core/window.c * src/core/screen.c: Add the API functions required by the compositor * src/Makefile.am: Relocate the new files svn path=/trunk/; revision=3715
* reorder declarations so we don't break C89 compilers.Jens Granseuer2008-04-071-6/+9
| | | | | | | | | | 2008-04-07 Jens Granseuer <jensgr@gmx.net> * src/core/session.c: (save_state), (warn_about_lame_clients_and_finish_interact): reorder declarations so we don't break C89 compilers. svn path=/trunk/; revision=3677
* files are saved in ~/.config/metacity/sessions and checked for there andThomas Thurman2008-03-271-11/+44
| | | | | | | | | | | 2008-03-27 Thomas Thurman <tthurman@gnome.org> * src/core/session.c (regenerate_save_file, save_state, load_state): files are saved in ~/.config/metacity/sessions and checked for there and in ~/.metacity/sessions. Fixes #518596. svn path=/trunk/; revision=3666
* MetaDisplay becomes a singleton. The static variable which holds thisThomas Thurman2008-03-251-139/+114
| | | | | | | | | | | | | | | | | | | | | | 2008-03-25 Thomas Thurman <tthurman@gnome.org> * src/core/display.c (meta_display_queue_retheme_all_windows, meta_set_syncing, meta_display_set_cursor_theme, disable_compositor, meta_display_for_x_display, meta_display_open, meta_display_close, meta_display_ungrab): MetaDisplay becomes a singleton. The static variable which holds this singleton is renamed "the_display" so as not to mask the this parameter in the methods. * src/core/main.c (main): * src/core/session.c (warn_about_lame_clients_and_finish_inte, save_state, io_from_warning_dialog): * src/core/core.c (meta_core_increment_event_serial): * src/core/delete.c (release_window_with_fd, search_and_destroy_window): sympathy changes for this, and consequent simplification. Closes #499301. svn path=/trunk/; revision=3663
* sort source files into these directories according to which part of the WMHavoc Pennington2007-12-191-0/+1889
2007-12-19 Havoc Pennington <hp@redhat.com> * src/ui, src/core, src/include: sort source files into these directories according to which part of the WM they are supposed to be in. In an eventual plan, we should also create src/compositor/render, src/compositor/fallback and move some of the compositor stuff into that. * autogen.sh: require a newer automake, so we don't have to use a recursive build * src/ui/tabpopup.c: put in a hack to make the build temporarily work, want to commit the large rearrangement before fixing this not to include workspace.h or frame.h * src/core/iconcache.c (meta_read_icons): temporarily break this to get the build to work, want to commit the large rearrangement before fixing this file not to include theme.h svn path=/trunk/; revision=3491