~ubuntu-branches/ubuntu/precise/empathy/precise-proposed-201205180810

« back to all changes in this revision

Viewing changes to debian/patches/31_really_raise_window.patch

  • Committer: Bazaar Package Importer
  • Author(s): Brian Curtis, Brian Curtis, Ken VanDine
  • Date: 2011-06-01 10:35:24 UTC
  • mfrom: (1.1.70 upstream) (6.3.44 experimental)
  • Revision ID: james.westby@ubuntu.com-20110601103524-wx3wgp71394730jt
Tags: 3.1.1-1ubuntu1
[ Brian Curtis ]
* Merge with Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Drop geoclue/mapping build-depends (they are in Universe)
  - Add Vcz-Bzr link
  - Add Suggests on telepathy-idle
  - Bump telepathy-butterfly, telepathy-haze to recommends
  - Don't recommend the freedesktop sound theme we have an ubuntu one
  - Add build depend for libunity-dev
* debian/rules:
  - Use autoreconf.mk
  - Disable map and location
* debian/empathy.install:
  - Install message indicator configuration
* debian/indicators/empathy:
  - Message indicator configuration
* debian/patches/01_lpi.patch:
  - Add Launchpad integration
* debian/patches/10_use_notify_osd_icons.patch:
  - Use the notify-osd image for new messages
* debian/patches/34_start_raised_execpt_in_session.patch
  - If not started with the session, we should always raise
* debian/patches/36_chat_window_default_size.patch:
  - Make the default chat window size larger
* debian/patches/37_facebook_default.patch:
  - Make facebook the default chat account type
* debian/patches/38_lp_569289.patch
  - Set freenode as default IRC network for new IRC accounts 
* debian/patches/41_unity_launcher_progress.patch
  - Display file transfer progress in the unity launcher

[ Ken VanDine ]
* debian/control
  - build depend on libgcr-3-dev instead of libgcr-dev
  - dropped build depends for libindicate, we will use telepathy-indicator
  - Depend on dconf-gsettings-backend | gsettings-backend
  - Added a Recommends for telepathy-indicator
* +debian/empathy.gsettings-override
  - Added an override for notifications-focus
* debian/patches/series
  - commented out 23_idomessagedialog_for_voip_and_ft.patch, until ido has 
    been ported to gtk3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Force focus of the window when selected from the indicator
2
 
Bug: https://bugs.launchpad.net/bugs/442389
3
 
 
4
 
=== modified file 'libempathy-gtk/empathy-ui-utils.c'
5
 
Index: empathy-2.33.1/libempathy-gtk/empathy-ui-utils.c
6
 
===================================================================
7
 
--- empathy-2.33.1.orig/libempathy-gtk/empathy-ui-utils.c       2011-02-02 11:22:39.271459005 -0500
8
 
+++ empathy-2.33.1/libempathy-gtk/empathy-ui-utils.c    2011-02-02 11:22:49.651459020 -0500
9
 
@@ -1596,6 +1596,41 @@
10
 
        }
11
 
 }
12
 
 
13
 
+/* Really raise the window, even if the window manager doesn't agree */
14
 
+static void
15
 
+really_activate_window (GtkWindow *window)
16
 
+{
17
 
+        Screen *screen;
18
 
+        Time    timestamp;
19
 
+        XEvent  xev;
20
 
+
21
 
+        g_return_if_fail (GTK_IS_WINDOW (window));
22
 
+
23
 
+        screen = GDK_SCREEN_XSCREEN (gtk_widget_get_screen (GTK_WIDGET (window)));
24
 
+        timestamp = GDK_CURRENT_TIME;
25
 
+
26
 
+        xev.xclient.type = ClientMessage;
27
 
+        xev.xclient.serial = 0;
28
 
+        xev.xclient.send_event = True;
29
 
+        xev.xclient.display = GDK_DISPLAY ();
30
 
+        xev.xclient.window = GDK_WINDOW_XWINDOW (GTK_WIDGET (window)->window);
31
 
+        xev.xclient.message_type = gdk_x11_get_xatom_by_name ("_NET_ACTIVE_WINDOW");
32
 
+        xev.xclient.format = 32;
33
 
+        xev.xclient.data.l[0] = 2; /* Pager client type */
34
 
+        xev.xclient.data.l[1] = timestamp;
35
 
+        xev.xclient.data.l[2] = 0;
36
 
+        xev.xclient.data.l[3] = 0;
37
 
+        xev.xclient.data.l[4] = 0;
38
 
+
39
 
+        gdk_error_trap_push ();
40
 
+        XSendEvent (GDK_DISPLAY (),
41
 
+                RootWindowOfScreen (screen),
42
 
+                False,
43
 
+                SubstructureRedirectMask | SubstructureNotifyMask,
44
 
+                &xev);
45
 
+        gdk_error_trap_pop ();
46
 
+}
47
 
+
48
 
 /* Takes care of moving the window to the current workspace. */
49
 
 void
50
 
 empathy_window_present_with_time (GtkWindow *window,
51
 
@@ -1630,6 +1665,7 @@
52
 
 
53
 
        gtk_window_set_skip_taskbar_hint (window, FALSE);
54
 
        gtk_window_deiconify (window);
55
 
+       really_activate_window (window);
56
 
 }
57
 
 
58
 
 void
59
 
Index: empathy-2.33.1/src/empathy-event-manager.c
60
 
===================================================================
61
 
--- empathy-2.33.1.orig/src/empathy-event-manager.c     2011-02-02 11:22:44.251459011 -0500
62
 
+++ empathy-2.33.1/src/empathy-event-manager.c  2011-02-02 11:22:49.651459020 -0500
63
 
@@ -44,6 +44,7 @@
64
 
 #include <libempathy-gtk/empathy-images.h>
65
 
 #include <libempathy-gtk/empathy-contact-dialogs.h>
66
 
 #include <libempathy-gtk/empathy-sound.h>
67
 
+#include <libempathy-gtk/empathy-ui-utils.h>
68
 
 
69
 
 #include <libido/idomessagedialog.h>
70
 
 #include <libempathy-gtk/empathy-ui-utils.h>
71
 
@@ -495,7 +496,7 @@
72
 
 
73
 
   if (event->approval->dialog != NULL)
74
 
     {
75
 
-      gtk_window_present (GTK_WINDOW (event->approval->dialog));
76
 
+      empathy_window_present (GTK_WINDOW (event->approval->dialog));
77
 
       return;
78
 
     }
79