[gnome-sudoku/arnaudb/wip/gtk4: 41/43] Fix SudokuView focus controller.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/arnaudb/wip/gtk4: 41/43] Fix SudokuView focus controller.
- Date: Wed, 5 Aug 2020 17:41:00 +0000 (UTC)
commit 6162d6f17123da3da2a312c5a9ed35a348453cf9
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Aug 5 19:20:25 2020 +0200
Fix SudokuView focus controller.
src/sudoku-view.vala | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/sudoku-view.vala b/src/sudoku-view.vala
index 6edbf87..4bcd240 100644
--- a/src/sudoku-view.vala
+++ b/src/sudoku-view.vala
@@ -366,7 +366,7 @@ private class SudokuCellView : Widget
private inline void draw (DrawingArea _this, Cairo.Context c, int new_width, int new_height)
{
RGBA background_color;
- if (_selected && is_focus)
+ if (_selected && focus_controller.is_focus)
background_color = selected_bg_color;
else if (is_fixed)
background_color = fixed_cell_color;
@@ -599,13 +599,11 @@ public class SudokuView : Widget
this.set_selected (cell_row, cell_col);
this.update_highlights ();
queue_draw ();
-
- return false;
});
- cell.focus_out_event.connect (() => {
+ cell.focus_controller.leave.connect (() => {
if (game.paused)
- return false;
+ return;
this.set_selected (-1, -1);
this.update_highlights ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]