~ubuntu-branches/ubuntu/wily/mutter/wily

« back to all changes in this revision

Viewing changes to src/core/session.c

  • Committer: Bazaar Package Importer
  • Author(s): Rico Tzschichholz
  • Date: 2011-04-10 22:27:59 UTC
  • mfrom: (0.7.1 upstream) (0.3.20 experimental)
  • Revision ID: james.westby@ubuntu.com-20110410222759-o6n1i5p0unsti44n
Tags: 3.0.0-0ubuntu1
* New upstream release

* Merge with debian experimental (LP: #742458), remaining changes:
  + debian/patches/03_link_gles2.patch: Link to clutter-glx-1.0
    explicitily at the end of link flags, to bring in libGLESv2 on armel.
* debian/control.in:
  + rename gir package to gir1.2-mutter-3.0
* debian/libmutter0.symbols:
  + updated
* debian/patches:
  + fix 03_link_gles2.patch 

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
  meta_topic (META_DEBUG_SM, "Compiled without session management support\n");
40
40
}
41
41
 
42
 
void
43
 
meta_session_shutdown (void)
44
 
{
45
 
  /* nothing */
46
 
}
47
 
 
48
42
const MetaWindowSessionInfo*
49
43
meta_window_lookup_saved_state (MetaWindow *window)
50
44
{
69
63
#include <string.h>
70
64
#include <stdlib.h>
71
65
#include <stdio.h>
72
 
#include "main.h"
73
 
#include "util.h"
 
66
#include <meta/main.h>
 
67
#include <meta/util.h>
74
68
#include "display-private.h"
75
 
#include "workspace.h"
 
69
#include <meta/workspace.h>
76
70
 
77
71
static void ice_io_error_handler (IceConn connection);
78
72
 
307
301
    SmProp prop1, prop2, prop3, prop4, prop5, prop6, *props[6];
308
302
    SmPropValue prop1val, prop2val, prop3val, prop4val, prop5val, prop6val;
309
303
    char pid[32];
310
 
    char hint = SmRestartImmediately;
 
304
    /* Historically, this was SmRestartImmediately, which made sense
 
305
     * for a stateless window manager, but we don't really control
 
306
     * what embedders do, and it's all around better if gnome-session
 
307
     * handles this.
 
308
     */
 
309
    char hint = SmRestartIfRunning;
311
310
    char priority = 20; /* low to run before other apps */
312
311
    
313
312
    prop1.name = SmProgram;
371
370
  g_free (saved_client_id);
372
371
}
373
372
 
374
 
void
375
 
meta_session_shutdown (void)
376
 
{
377
 
  /* Change our restart mode to IfRunning */
378
 
  
379
 
  SmProp prop1;
380
 
  SmPropValue prop1val;
381
 
  SmProp *props[1];
382
 
  char hint = SmRestartIfRunning;
383
 
 
384
 
  if (session_connection == NULL)
385
 
    return;
386
 
  
387
 
  prop1.name = SmRestartStyleHint;
388
 
  prop1.type = SmCARD8;
389
 
  prop1.num_vals = 1;
390
 
  prop1.vals = &prop1val;
391
 
  prop1val.value = &hint;
392
 
  prop1val.length = 1;
393
 
    
394
 
  props[0] = &prop1;
395
 
  
396
 
  SmcSetProperties (session_connection, 1, props);
397
 
}
398
 
 
399
373
static void
400
374
disconnect (void)
401
375
{
544
518
static void
545
519
die_callback (SmcConn smc_conn, SmPointer client_data)
546
520
{
547
 
  meta_topic (META_DEBUG_SM, "Exiting at request of session manager\n");
 
521
  meta_topic (META_DEBUG_SM, "Disconnecting from session manager");
548
522
  disconnect ();
549
 
  meta_quit (META_EXIT_SUCCESS);
 
523
  /* We don't actually exit here - we will simply go away with the X
 
524
   * server on logout, when we lose the X connection and libx11 kills
 
525
   * us.  It looks like *crap* on logout if the user sees their
 
526
   * windows lose the decorations, etc.
 
527
   *
 
528
   * Anything that wants us to go away outside of session management
 
529
   * can use kill().
 
530
   */
550
531
}
551
532
 
552
533
static void
952
933
          g_free (title);
953
934
              
954
935
          /* Sticky */
955
 
          if (window->on_all_workspaces)
 
936
          if (window->on_all_workspaces_requested)
956
937
            fputs ("    <sticky/>\n", outfile);
957
938
 
958
939
          /* Minimized */
1823
1804
                           "and will have to be restarted manually next time "
1824
1805
                           "you log in."),
1825
1806
                         "240",
1826
 
                         meta_screen_get_screen_number (meta_get_display()->active_screen),
 
1807
                         meta_get_display()->active_screen->screen_name,
1827
1808
                         NULL, NULL,
1828
1809
                         None,
1829
1810
                         columns,