~ubuntu-branches/ubuntu/raring/virt-manager/raring

« back to all changes in this revision

Viewing changes to debian/patches/fix_keyboard_grab.patch

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-11-23 14:34:21 UTC
  • mfrom: (2.1.37 sid)
  • Revision ID: package-import@ubuntu.com-20121123143421-i02k98occ2dml38k
Tags: 0.9.4-2ubuntu1
* Merge from debian unstable. Remaining changes:
  - debian/control, debian/rules: Build using dh_python2
  - debian/control: Depend on python-appindicator for appindicator
    support.
  - debian/patches/more_helpful_error_message.patch: explain to the user
    why he can't connect to qemu:///system and what he can do fix it.
  - debian/control: drop python-spice-client-gtk to Suggests as it is in
    universe.
  - debian/patches/use_ubuntu_package_names.patch: Suggest installing the
    packages that are actually available in Ubuntu.
  - debian/rules: Set qemu user to libvirt-qemu so appropriate
    permissions get set.
  - debian/rules: Set Ubuntu as the preferred distro so we appear first
    in the list.
  - debian/rules: disable TUI for now, since the required dependencies
    are not available (Newt Syrup).
  - debian/rules: Drop patchsys-quilt include since dpkg-source does the
    quilt dance for us.
  - debian/rules: specify Ubuntu package names to prompt user with
    packagekit installation on first use.
  - Removed python-ipy dependency as it is in universe:
    - debian/control: remove python-ipy from Depends
    - debian/series: disable 0002-Use-IPy-from-python-ipy.patch patch so
      we use the one that's included in the virt-manager source.
    - debian/rules: don't delete the IPy file.
  - debian/patches/fork_before_gtk_import.patch: work around global menu
    and appindicator not working correctly by forking before the gtk
    import.
  - debian/patches/fix_kvm_packages_list.patch: Fix substitution variable
    mismatch causing incorrect list of packages to be displayed in
    initial dialog box.
* Removed patches:
  - fix_keyboard_grab.patch: upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: fix keyboard grab focus issues
2
 
Origin: upstream, http://git.fedorahosted.org/cgit/virt-manager.git/commit/?id=a96a3245fb556dc02ff471c223c7728ea76b6fab
3
 
Origin: upstream, http://git.fedorahosted.org/cgit/virt-manager.git/commit/?id=8bfad3a2cc1c83e8d0f04f232b0ebe0847fd6bca
4
 
 
5
 
Index: virt-manager-0.9.3/src/virtManager/console.py
6
 
===================================================================
7
 
--- virt-manager-0.9.3.orig/src/virtManager/console.py  2012-07-09 17:13:28.000000000 -0400
8
 
+++ virt-manager-0.9.3/src/virtManager/console.py       2012-08-22 12:59:45.581780999 -0400
9
 
@@ -246,7 +246,6 @@
10
 
         vmmGObject.__init__(self)
11
 
         self.console = console
12
 
         self.display = None
13
 
-        self.need_keygrab = False
14
 
 
15
 
     def close(self):
16
 
         raise NotImplementedError()
17
 
@@ -320,9 +319,6 @@
18
 
         # Last noticed desktop resolution
19
 
         self.desktop_resolution = None
20
 
 
21
 
-        # VNC viewer needs a bit of help grabbing keyboard in a friendly way
22
 
-        self.need_keygrab = True
23
 
-
24
 
     def init_widget(self):
25
 
         self.set_grab_keys()
26
 
 
27
 
@@ -333,7 +329,7 @@
28
 
 
29
 
         self.console.refresh_scaling()
30
 
 
31
 
-        self.display.set_keyboard_grab(False)
32
 
+        self.display.set_keyboard_grab(True)
33
 
         self.display.set_pointer_grab(True)
34
 
 
35
 
         self.display.connect("vnc-pointer-grab", self.console.pointer_grabbed)
36
 
@@ -715,17 +711,6 @@
37
 
 
38
 
         self.topwin.set_title(title)
39
 
 
40
 
-    def grab_keyboard(self, do_grab):
41
 
-        if self.viewer and not self.viewer.need_keygrab:
42
 
-            return
43
 
-
44
 
-        if (not do_grab or
45
 
-            not self.viewer or
46
 
-            not self.viewer.display):
47
 
-            gtk.gdk.keyboard_ungrab()
48
 
-        else:
49
 
-            gtk.gdk.keyboard_grab(self.viewer.display.window)
50
 
-
51
 
     def viewer_focus_changed(self, ignore1=None, ignore2=None):
52
 
         has_focus = (self.viewer and
53
 
                      self.viewer.display and
54
 
@@ -739,8 +724,6 @@
55
 
         else:
56
 
             self._enable_modifiers()
57
 
 
58
 
-        self.grab_keyboard(has_focus)
59
 
-
60
 
     def pointer_grabbed(self, src_ignore):
61
 
         self.pointer_is_grabbed = True
62
 
         self.change_title()