Merge lp:~gandalfn/slingshot/fix-input-event into lp:~elementary-pantheon/slingshot/trunk

Proposed by Zisu Andrei
Status: Rejected
Rejected by: Cody Garver
Proposed branch: lp:~gandalfn/slingshot/fix-input-event
Merge into: lp:~elementary-pantheon/slingshot/trunk
Diff against target: 111 lines (+24/-11) (has conflicts)
1 file modified
src/SlingshotView.vala (+24/-11)
Text conflict in src/SlingshotView.vala
To merge this branch: bzr merge lp:~gandalfn/slingshot/fix-input-event
Reviewer Review Type Date Requested Status
Cody Garver (community) Disapprove
Adam Bieńkowski (community) code Needs Fixing
Review via email: mp+312215@code.launchpad.net
To post a comment you must log in.
Revision history for this message
quequotion (quequotion) wrote :

Are these supposed to be here?

<<<<<<< TREE
=======
>>>>>>> MERGE-SOURCE

Revision history for this message
Adam Bieńkowski (donadigo) wrote :

Conflicts with trunk.

review: Needs Fixing (code)
Revision history for this message
quequotion (quequotion) wrote :

> Are these supposed to be here?
>
> <<<<<<< TREE
> =======
> >>>>>>> MERGE-SOURCE

After fixing that part of the patch, gandalfn's merge proposal works.

This patch is very similar to the pantheon-debian patch:
https://gitlab.com/pantheon-debian/slingshot-launcher/commit/db8474f079a02ad005d662040ff6452c1e2f0b05

Except for this section:
@@ -402,8 +408,10 @@
                 case "9":
                     int page = int.parse (key);

- if (event.state != Gdk.ModifierType.MOD1_MASK)
- return false;
+ if (event.state != Gdk.ModifierType.MOD1_MASK) {
+ search_entry.key_press_event (event);
+ return true;
+ }

                     if (modality == Modality.NORMAL_VIEW) {
                         if (page < 0 || page == 9)

Is either preferrable for any reason?

Revision history for this message
Zisu Andrei (matzipan) wrote :

This seems to be an inactive branch. Perhaps we should create a new merge request based on this.

Revision history for this message
quequotion (quequotion) wrote :

>>matzipan
I've updated my branch, rebased upstream, and reimplemented gandalfn's method:
https://code.launchpad.net/~quequotion/slingshot/fix-1635776/+merge/310705

Revision history for this message
Cody Garver (codygarver) wrote :

I am rejecting this branch because we are accepting the simpler proposal (https://code.launchpad.net/~santileortiz/slingshot/fix-1635776/+merge/314255), which removes old hacky code that appears to be the source of the problem.

However, we've already reverted 1 commit that intended to fix this problem, so please stick around to make sure the problem is finally solved.

review: Disapprove

Unmerged revisions

651. By gandalfn

The scroll and key press/release event forwading from event box does not
work on debian testing.
Activate the default event mask for this events for event box.
Disconnect search entry key press/release event from event forwarding.
Send key press/release event forwarding from event box to search entry in all case.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/SlingshotView.vala'
--- src/SlingshotView.vala 2016-11-21 04:43:16 +0000
+++ src/SlingshotView.vala 2016-12-01 00:54:11 +0000
@@ -204,6 +204,7 @@
204 container.attach (stack, 0, 1, 1, 1);204 container.attach (stack, 0, 1, 1, 1);
205205
206 event_box = new Gtk.EventBox ();206 event_box = new Gtk.EventBox ();
207 event_box.add_events (Gdk.EventMask.SCROLL_MASK | Gdk.EventMask.KEY_PRESS_MASK | Gdk.EventMask.KEY_RELEASE_MASK);
207 event_box.add (container);208 event_box.add (container);
208 // Add the container to the dialog's content area209 // Add the container to the dialog's content area
209210
@@ -233,7 +234,6 @@
233 });234 });
234235
235 event_box.key_press_event.connect (on_key_press);236 event_box.key_press_event.connect (on_key_press);
236 search_entry.key_press_event.connect (on_key_press);
237 // Showing a menu reverts the effect of the grab_device function.237 // Showing a menu reverts the effect of the grab_device function.
238 search_entry.search_changed.connect (() => {238 search_entry.search_changed.connect (() => {
239 if (modality != Modality.SEARCH_VIEW)239 if (modality != Modality.SEARCH_VIEW)
@@ -384,8 +384,14 @@
384 case "Enter": // "KP_Enter"384 case "Enter": // "KP_Enter"
385 case "Return":385 case "Return":
386 case "KP_Enter":386 case "KP_Enter":
387<<<<<<< TREE
387 return false;388 return false;
388389
390=======
391 search_entry.key_press_event (event);
392 return true;
393
394>>>>>>> MERGE-SOURCE
389 case "Alt_L":395 case "Alt_L":
390 case "Alt_R":396 case "Alt_R":
391 break;397 break;
@@ -402,8 +408,10 @@
402 case "9":408 case "9":
403 int page = int.parse (key);409 int page = int.parse (key);
404410
405 if (event.state != Gdk.ModifierType.MOD1_MASK)411 if (event.state != Gdk.ModifierType.MOD1_MASK) {
406 return false;412 search_entry.key_press_event (event);
413 return true;
414 }
407415
408 if (modality == Modality.NORMAL_VIEW) {416 if (modality == Modality.NORMAL_VIEW) {
409 if (page < 0 || page == 9)417 if (page < 0 || page == 9)
@@ -416,7 +424,8 @@
416 else424 else
417 category_view.app_view.go_to_number (page);425 category_view.app_view.go_to_number (page);
418 } else {426 } else {
419 return false;427 search_entry.key_press_event (event);
428 return true;
420 }429 }
421 search_entry.grab_focus ();430 search_entry.grab_focus ();
422 break;431 break;
@@ -515,17 +524,19 @@
515 if (event.state == Gdk.ModifierType.SHIFT_MASK) { // Shift + Delete524 if (event.state == Gdk.ModifierType.SHIFT_MASK) { // Shift + Delete
516 search_entry.text = "";525 search_entry.text = "";
517 } else if (search_entry.has_focus) {526 } else if (search_entry.has_focus) {
518 return false;527 search_entry.key_press_event (event);
528 return true;
519 } else {529 } else {
520 search_entry.grab_focus ();530 search_entry.grab_focus ();
521 search_entry.move_cursor (Gtk.MovementStep.BUFFER_ENDS, 0, false);531 search_entry.move_cursor (Gtk.MovementStep.BUFFER_ENDS, 0, false);
522 return false;532 return true;
523 }533 }
524 break;534 break;
525535
526 case "Home":536 case "Home":
527 if (search_entry.text.length > 0) {537 if (search_entry.text.length > 0) {
528 return false;538 search_entry.key_press_event (event);
539 return true;
529 }540 }
530541
531 if (modality == Modality.NORMAL_VIEW) {542 if (modality == Modality.NORMAL_VIEW) {
@@ -538,7 +549,8 @@
538549
539 case "End":550 case "End":
540 if (search_entry.text.length > 0) {551 if (search_entry.text.length > 0) {
541 return false;552 search_entry.key_press_event (event);
553 return true;
542 }554 }
543555
544 if (modality == Modality.NORMAL_VIEW) {556 if (modality == Modality.NORMAL_VIEW) {
@@ -554,7 +566,8 @@
554 if ((event.state & (Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.SHIFT_MASK)) != 0) {566 if ((event.state & (Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.SHIFT_MASK)) != 0) {
555 search_entry.paste_clipboard ();567 search_entry.paste_clipboard ();
556 } else {568 } else {
557 return false;569 search_entry.key_press_event (event);
570 return true;
558 }571 }
559 break;572 break;
560573
@@ -562,9 +575,9 @@
562 if (!search_entry.has_focus) {575 if (!search_entry.has_focus) {
563 search_entry.grab_focus ();576 search_entry.grab_focus ();
564 search_entry.move_cursor (Gtk.MovementStep.BUFFER_ENDS, 0, false);577 search_entry.move_cursor (Gtk.MovementStep.BUFFER_ENDS, 0, false);
565 search_entry.key_press_event (event);
566 }578 }
567 return false;579 search_entry.key_press_event (event);
580 return true;
568581
569 }582 }
570583

Subscribers

People subscribed via source and target branches