Guake / guake

Drop-down terminal for GNOME
https://guake.github.io
GNU General Public License v2.0
4.39k stars 575 forks source link

Guake jumps between monitors when I open it with the F12 shortcut key #1547

Closed behrangsa closed 5 years ago

behrangsa commented 5 years ago

A few days ago I upgraded my Ubuntu 18.10 to 19.04. Now when the cursor is on my right monitor, pressing F12 opens Guake alternatively on my right and left monitors.

If I move the cursor to left screen, Guake (as expected) only opens on the left monitor.

Here is a video recording that shows the problem:

Guake on Ubuntu 19.04 jumps between screens -- sometimes

Let me know if you need more information.

gsemet commented 5 years ago

That’s funny but I agree completely unusable. I don’t have a multi display setup I cannot début it. You can have a look at the python code, start with the -v parameter

behrangsa commented 5 years ago

Yeah it is quite weird. Here are the logs:

Starting Guake:

➜  ~ guake -v                                                                                                                                          20:21:09
Logging configuration complete
Guake not running, starting it
Wanted GTK theme: 'Yaru'
Prefer dark theme: False
Patching theme 'Yaru' (prefer dark = ''no''), overriding tab 'checked' state': foreground: '#ffffff', background: '#e95420'
Guake Terminal 3.4.0
VTE 0.56.1
Gtk 3.24.8
reload_global: 'F12'
set_final_window_rect
  height_percents = 58
  width_percents = 57
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 2560
  window_rect.y: 0
  window_rect.height: 1440
  window_rect.width: 2560
is unity: False
Correcteed monitor size:
  total_width: 2560
  total_height: 1440
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 3110
  window_rect.y: 0
  window_rect.height: 835
  window_rect.width: 1459
Updated window position: (root_x=3110, root_y=0)
set_final_window_rect
  height_percents = 58
  width_percents = 57
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 2560
  window_rect.y: 0
  window_rect.height: 1440
  window_rect.width: 2560
is unity: False
Correcteed monitor size:
  total_width: 2560
  total_height: 1440
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 3110
  window_rect.y: 0
  window_rect.height: 835
  window_rect.width: 1459
Updated window position: (root_x=3110, root_y=0)

(guake:14818): Vte-WARNING **: 20:21:13.650: (../../src/vtegtk.cc:1975):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:14818): Vte-WARNING **: 20:21:13.650: (../../src/vtegtk.cc:1975):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:14818): Vte-WARNING **: 20:21:13.650: (../../src/vtegtk.cc:1975):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:14818): Vte-WARNING **: 20:21:13.650: (../../src/vtegtk.cc:1975):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:14818): Vte-WARNING **: 20:21:13.650: (../../src/vtegtk.cc:1975):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)

(guake:14818): Vte-WARNING **: 20:21:13.650: (../../src/vtegtk.cc:1975):int vte_terminal_match_add_regex(VteTerminal*, VteRegex*, guint32): runtime check failed: (_vte_regex_get_compile_flags(regex) & PCRE2_MULTILINE)
Spawn command: "/usr/bin/fish"
set_final_window_rect
  height_percents = 58
  width_percents = 57
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 2560
  window_rect.y: 0
  window_rect.height: 1440
  window_rect.width: 2560
is unity: False
Correcteed monitor size:
  total_width: 2560
  total_height: 1440
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 3110
  window_rect.y: 0
  window_rect.height: 835
  window_rect.width: 1459
Updated window position: (root_x=3110, root_y=0)
set_final_window_rect
  height_percents = 58
  width_percents = 57
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 2560
  window_rect.y: 0
  window_rect.height: 1440
  window_rect.width: 2560
is unity: False
Correcteed monitor size:
  total_width: 2560
  total_height: 1440
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 3110
  window_rect.y: 0
  window_rect.height: 835
  window_rect.width: 1459
Updated window position: (root_x=3110, root_y=0)
Guake initialized
Running main gtk loop

Pressing F12 four times (appears on the right screen, disappears, appears on the left screen, disappears):

Show_hide called

================================================================================
Window display
gtk.gdk.WindowState = 0
GDK_WINDOW_STATE_STICKY? False
GDK_WINDOW_STATE_WITHDRAWN? False
GDK_WINDOW_STATE_ABOVE? False
GDK_WINDOW_STATE_ICONIFIED? False
Showing the terminal
set_final_window_rect
  height_percents = 58
  width_percents = 57
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 2560
  window_rect.y: 0
  window_rect.height: 1440
  window_rect.width: 2560
is unity: False
Correcteed monitor size:
  total_width: 2560
  total_height: 1440
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 3110
  window_rect.y: 0
  window_rect.height: 835
  window_rect.width: 1459
Updated window position: (root_x=3110, root_y=0)
Moving window to: <Gdk.Rectangle object at 0x7fbf05af4588 (GdkRectangle at 0x244b070)>
set_final_window_rect
  height_percents = 58
  width_percents = 57
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 2560
  window_rect.y: 0
  window_rect.height: 1440
  window_rect.width: 2560
is unity: False
Correcteed monitor size:
  total_width: 2560
  total_height: 1440
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 3110
  window_rect.y: 0
  window_rect.height: 835
  window_rect.width: 1459
Updated window position: (root_x=0, root_y=0)
order to present and deiconify
Current window position: (root_x=0, root_y=0)
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Hiding on focus lose
Received window state event: <flags GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Show_hide called
Received window state event: <flags GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Show_hide called

================================================================================
Window display
gtk.gdk.WindowState = 0
GDK_WINDOW_STATE_STICKY? False
GDK_WINDOW_STATE_WITHDRAWN? False
GDK_WINDOW_STATE_ABOVE? False
GDK_WINDOW_STATE_ICONIFIED? False
Showing the terminal
set_final_window_rect
  height_percents = 58
  width_percents = 57
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1440
  window_rect.width: 2560
is unity: False
Correcteed monitor size:
  total_width: 2560
  total_height: 1440
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 550
  window_rect.y: 0
  window_rect.height: 835
  window_rect.width: 1459
Updated window position: (root_x=550, root_y=0)
Moving window to: <Gdk.Rectangle object at 0x7fbf05af4588 (GdkRectangle at 0x26e4f40)>
set_final_window_rect
  height_percents = 58
  width_percents = 57
  halignment = 0
  valignment = 0
  vdisplacement = 0
  hdisplacement = 0
Current monitor geometry
  window_rect.x: 0
  window_rect.y: 0
  window_rect.height: 1440
  window_rect.width: 2560
is unity: False
Correcteed monitor size:
  total_width: 2560
  total_height: 1440
RESIZING MAIN WINDOW TO THE FOLLOWING VALUES:
  window_rect.x: 550
  window_rect.y: 0
  window_rect.height: 835
  window_rect.width: 1459
Updated window position: (root_x=550, root_y=0)
order to present and deiconify
Current window position: (root_x=550, root_y=0)
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Hiding on focus lose
Received window state event: <flags GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_STICKY | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Show_hide called
Received window state event: <flags GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_FOCUSED | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
Received window state event: <flags GDK_WINDOW_STATE_WITHDRAWN | GDK_WINDOW_STATE_ABOVE | GDK_WINDOW_STATE_TOP_RESIZABLE | GDK_WINDOW_STATE_RIGHT_RESIZABLE | GDK_WINDOW_STATE_BOTTOM_RESIZABLE | GDK_WINDOW_STATE_LEFT_RESIZABLE of type Gdk.WindowState>
behrangsa commented 5 years ago

Just FYI, in the meantime I have toggled the "Appear on mouse display" option off and this way it doesn't jump between the displays and always opens on the selected display.

This works fine no matter which display I choose for the "Appear on display" option.

mlouielu commented 5 years ago

I can reproduce in v3.4.0, with two monitor, when putting mouse in the primary, it will jump between two monitor, if put the mouse in secondary, it will only shows in secondary.

Is a bug at guake/utils.py, and fixed in 6918843b6.

You can take a look if using master HEAD fix this problem. Install Guake from source

gsemet commented 5 years ago

Great :) look like the perfect time to release :)