Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(893)

Issue 6302047: Fix issue - keybinding with Super, Hyper and Meta Modifiers does not work. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by Peng
Modified:
12 years, 5 months ago
Reviewers:
fujiwara
Base URL:
git@github.com:ibus/ibus.git@master
Visibility:
Public.

Description

Fix issue - keybinding with Super, Hyper and Meta Modifiers does not work. BUG=None TEST=Manually

Patch Set 1 #

Total comments: 1

Patch Set 2 : Update #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -17 lines) Patch
M ui/gtk3/grabkeycode.c View 1 chunk +8 lines, -8 lines 0 comments Download
M ui/gtk3/keybindingmanager.vala View 1 2 chunks +12 lines, -6 lines 1 comment Download
M ui/gtk3/panel.vala View 1 chunk +13 lines, -3 lines 0 comments Download

Messages

Total messages: 7
Peng
12 years, 5 months ago (2012-06-06 15:57:13 UTC) #1
Peng
12 years, 5 months ago (2012-06-06 15:59:13 UTC) #2
fujiwara
https://codereview.appspot.com/6302047/diff/1/ui/gtk3/panel.vala File ui/gtk3/panel.vala (right): https://codereview.appspot.com/6302047/diff/1/ui/gtk3/panel.vala#newcode97 ui/gtk3/panel.vala:97: Gdk.Keymap.get_default().map_virtual_modifiers(ref m_switch_modifiers); In vala 0.16, ref causes an build ...
12 years, 5 months ago (2012-06-07 09:56:54 UTC) #3
fujiwara
https://codereview.appspot.com/6302047/diff/5/ui/gtk3/keybindingmanager.vala File ui/gtk3/keybindingmanager.vala (right): https://codereview.appspot.com/6302047/diff/5/ui/gtk3/keybindingmanager.vala#newcode41 ui/gtk3/keybindingmanager.vala:41: // Gdk.ModifierType.MOD5_MASK | // What is the last //?
12 years, 5 months ago (2012-06-07 12:01:14 UTC) #4
Peng
On 2012/06/07 09:56:54, fujiwara wrote: > https://codereview.appspot.com/6302047/diff/1/ui/gtk3/panel.vala > File ui/gtk3/panel.vala (right): > > https://codereview.appspot.com/6302047/diff/1/ui/gtk3/panel.vala#newcode97 > ...
12 years, 5 months ago (2012-06-07 12:04:44 UTC) #5
fujiwara
On 2012/06/07 12:04:44, Peng wrote: > On 2012/06/07 09:56:54, fujiwara wrote: > > https://codereview.appspot.com/6302047/diff/1/ui/gtk3/panel.vala > ...
12 years, 5 months ago (2012-06-08 02:29:23 UTC) #6
fujiwara
12 years, 5 months ago (2012-06-08 02:36:24 UTC) #7
On 2012/06/08 02:29:23, fujiwara wrote:
> On 2012/06/07 12:04:44, Peng wrote:
> > On 2012/06/07 09:56:54, fujiwara wrote:
> > > https://codereview.appspot.com/6302047/diff/1/ui/gtk3/panel.vala
> > > File ui/gtk3/panel.vala (right):
> > > 
> > > https://codereview.appspot.com/6302047/diff/1/ui/gtk3/panel.vala#newcode97
> > > ui/gtk3/panel.vala:97: Gdk.Keymap.get_default().map_virtual_modifiers(ref
> > > m_switch_modifiers);
> > > In vala 0.16, ref causes an build error:
> > > 
> > > panel.vala:160.64-160.83: error: Argument 1: Cannot pass ref argument to
> > > non-reference parameter
> > >                 Gdk.Keymap.get_default().map_virtual_modifiers(ref
> > > switch_modifiers);
> > >                                                               
> > > ^^^^^^^^^^^^^^^^^^^^
> > > 
> > > % grep map_virtual_modifiers /usr/share/vala-0.16/vapi/gdk-3.0.vapi
> > > 		public bool map_virtual_modifiers (out Gdk.ModifierType state);
> > > 
> > > s/ref/out/
> > > 
> > > But map_virtual_modifiers does not work in my test:
> > > 
> > >     Gtk.accelerator_parse("<Super>space",
> > >             out switch_keysym, out switch_modifiers);
> > >     print ("test %x %x\n", switch_keysym, switch_modifiers);
> > >     Gdk.Keymap.get_default().map_virtual_modifiers(out switch_modifiers);
> > >     print ("test2 %x %x\n", switch_keysym, switch_modifiers);
> > > 
> > > % ./a.out
> > > test 20 4000000
> > > test2 20 0
> > Maybe it is because of ref/out change. I think the Gdk vapi has a bug. I use
> ref
> > in Gdk vapi file. Please try it.
> 
> OK, I confirmed the patch can work with modifying the gdk.vapi:
> # diff /usr/share/vala-0.16/vapi/gdk-3.0.vapi.orig \
>        /usr/share/vala-0.16/vapi/gdk-3.0.vapi
> 4776c4776
> < 		public bool map_virtual_modifiers (out Gdk.ModifierType state);
> ---
> > 		public bool map_virtual_modifiers (ref Gdk.ModifierType state);
> 
> 
> Probably I think it's good to use '#if VALA_0_18' while I'm not sure if it
will
> be fixed in vala 0.18.

lgtm.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b