~ubuntu-branches/ubuntu/lucid/empathy/lucid-updates

« back to all changes in this revision

Viewing changes to libempathy-gtk/empathy-ui-utils.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-03-29 16:38:54 UTC
  • mfrom: (1.1.51 upstream)
  • Revision ID: james.westby@ubuntu.com-20100329163854-af9wwlzew6s54j40
Tags: 2.30.0-0ubuntu1
* New upstream release:
  - Fixed #613596, Account Assistant translations are not loaded (Guillaume
    Desmottes) (LP: #544208)
  - Fixed #601693, Shouldn't cycle tab if gtk-keynav-wrap-around is 0 (Aaron
    Brown)
  - Fixed #612557, empathy_sidebar_menu_position_under: assertion
    `gtk_widget_get_has_window (user_data)' failed (Guillaume Desmottes)
  - Fixed #613117, Please fix escaping of UTF-chars in ui file (Gabor Kelemen)
  - Fixed #613272, im settings capplet goes offscreen when advanced is expanded
    (Travis Reitter)
  - Fixed #613437, Empathy fails to build (Guillaume Desmottes)
  - Fixed #613793, remove non-standard notification capabilities (Nicolò Chieffo)
  - Fixed #613892, Should start hidden when activated (Guillaume Desmottes)
  - Fixed #614155, Move Tab Left/Right should have accelerator (Aaron Brown)
  - Fixed #613772, Minor typo in Empathy documentation (Marios Zindilis)
* debian/patches/99_autoreconf.patch: renamed and refreshed 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1383
1383
        gtk_window_iconify (window);
1384
1384
}
1385
1385
 
 
1386
/* Code from Thomas Thurman
 
1387
 * http://people.collabora.co.uk/~tthurman/pingwindow.c.txt
 
1388
 */
 
1389
static guint32
 
1390
get_server_time (void)
 
1391
{
 
1392
  Display *display;
 
1393
  Window pingingWindow;
 
1394
  XEvent propertyEvent;
 
1395
  XSetWindowAttributes attrs;
 
1396
 
 
1397
  display = XOpenDisplay (NULL);
 
1398
 
 
1399
  attrs.override_redirect = True;
 
1400
  attrs.event_mask = PropertyChangeMask;
 
1401
 
 
1402
  pingingWindow = XCreateWindow (display,
 
1403
      XRootWindow (display, 0), /* parent */
 
1404
      -100, -100, 1, 1, /* off-screen */
 
1405
      0,
 
1406
      CopyFromParent,
 
1407
      CopyFromParent,
 
1408
      (Visual *) CopyFromParent,
 
1409
      CWOverrideRedirect | CWEventMask,
 
1410
      &attrs);
 
1411
 
 
1412
  /* Change a property. XA_PRIMARY is never really
 
1413
   * used for properties, so it's safe.
 
1414
   */
 
1415
  XChangeProperty (display,
 
1416
      pingingWindow,
 
1417
      XA_PRIMARY, XA_STRING, 8,
 
1418
      PropModeAppend, NULL, 0);
 
1419
 
 
1420
  /* Pick up the event. */
 
1421
  XWindowEvent (display,
 
1422
      pingingWindow,
 
1423
      PropertyChangeMask,
 
1424
      &propertyEvent);
 
1425
 
 
1426
  /* If you want to do this often,
 
1427
   * just keep the window around and
 
1428
   * don't destroy it.
 
1429
   */
 
1430
  XDestroyWindow (display, pingingWindow);
 
1431
 
 
1432
  return ((XPropertyEvent *) &propertyEvent)->time;
 
1433
}
 
1434
 
1386
1435
/* Takes care of moving the window to the current workspace. */
1387
1436
void
1388
1437
empathy_window_present (GtkWindow *window)
1412
1461
 
1413
1462
        timestamp = gtk_get_current_event_time ();
1414
1463
        if (timestamp == 0)
1415
 
                /* No event, fallback to _NET_WM_USER_TIME */
1416
 
                timestamp = gdk_x11_display_get_user_time (gdk_display_get_default ());
 
1464
                /* No event, fallback to X server time */
 
1465
                timestamp = get_server_time ();
1417
1466
 
1418
1467
        gtk_window_present_with_time (window, timestamp);
1419
1468
        gtk_window_set_skip_taskbar_hint (window, FALSE);