Open bmanolov opened 4 years ago
Here is the phpdesktop and cefclient code for creating GTK window. It seems to me that removing the vbox container in GTK 2 might resolve the issue. Please change line 57 to "return window" and rebuild phpdesktop by following the Build on Linux instructions. Use branch "linux72".
Ok, I've changed line 57 and compiled everything but the bug is still present.
diff --git a/src/gtk.cpp b/src/gtk.cpp
index 9e7bafa..356691c 100644
--- a/src/gtk.cpp
+++ b/src/gtk.cpp
@@ -54,7 +54,7 @@ GtkWidget* create_gtk_window(const char* title, const char* icon,
set_window_icon(GTK_WINDOW(window), icon);
gtk_widget_show_all(window);
- return vbox;
+ return window;
}
Does the issue reproduce on a clean OS? What OS version should I install in virtual machine to reproduce it?
I was able to reproduce the bug on a clean install of Debian 10 in VirtualBox:
I haven't yet tested it on Debian 10. Just wanted to add that other users report it works fine on Ubuntu 18 which is based on Debian 10 buster. Can you test using different desktop environment on Debian, for example with GNOME?
:heavy_check_mark: Yes, I can confirm that there are no issues on Ubuntu 18.
:x: I have just tested it on a vanilla installation of Debian 10 with GNOME 3.30.2 and the results are negative: the keyboard input does not work. It was necessary to install GTK2 as it wasn't preinstalled.
Other things to test:
NotifyMoveOrResizeStarted
during that event.ScopedGdkThreadsEnter scoped_gdk_threads;
before creating GTK window (declared in util_gtk.cpp / .h) as in cefclient.--hide-controls
flag.I haven't done the extra tests but I noticed something interesting about the cefclient that I built. On start it seems to be fine - I can type in the search form on the google page and I can scroll with the keyboard. But as soon I click in the address bar only the address bar gets the keyboard input:
After some random clicking the address bar appears to lose the connection to the keyboard, but I can no longer type in the form field on the google page, nor can I scroll with the keyboard.
And on every 5-10 runs of the cefclient there were cases where the keyboard input was not working completely.
I just saw that you already filed a bug report about the issue that I mentioned (or something similar):
https://bitbucket.org/chromiumembedded/cef/issues/2026/multiple-major-keyboard-focus-issues-on
I have executed the three steps but the bug was still present. I am not entirely sure though if I've done the things correctly so here are my changes:
As for step 4, I have executed the cefclient with the --hide-controls
flag and in 40-50% of the cases the keyboard focus bug was present. I couldn't however find a definitive pattern. I must add that the bug manifests itself during normal executions of cefclient too, but not always. It happens on every fifth or so run. The first clue that something is wrong is the missing focus in the google search form, i.e. there is no blinking cursor in the form text field.
Changes look good. But the problem is elsewhere since you can reproduce the issue in cefclient quite easily when controls are hidden.
The bitbucket issue provides information on resolving focus issues. It requires patching CEF and making changes to app code to handle focus-in-event, focus-out-event and grab-focus signals.
This could be applied without the need to patch CEF.
First try to make app changes to focus signals:
If that doesn't help then instead of SendFocusEvent calls do XSetInputFocus(xdisplay_, xwindow_, RevertToParent, x11::CurrentTime)
where xdisplay_ is cef_get_xdisplay()
and xwindow_ is find_child_browser(get_window_xid(widget))
.
In focus-out-event signal don't call XSetInputFocus
nor any other functions.
Or maybe it is required to call XSetInputFocus(xdisplay, get_window_xid(widget), ...)
in "focus-out-event" signal.
Hello !
I also have this issue ; spent the day trying to compile the CFE branch with the fix, to no avail.
Is there a fix in the works for this repo, or are you waiting for the merge upstream ?
I don't think this is fixed in CEF. You need to change phpdesktop code that handles focus signals. I've mentioned the X11 functions in an earlier comment.
Initially posted in the forum
I am testing the linux-v72.0 package without any modifications and it seems that the keyboard input is not working. I cannot type anything in the text fields in forms.php, nor can I scroll long pages using the keyboard (Page Up, Page Down, arrow keys). The developers tools work fine however, so this problem is present only in the main browser window.
Here are my system specifications:
Here is a sample debug output from the console.
I have tested all packages from the linux-v70.0 release to see if the bug is present in any of them:
As per Czarek's request I've built the cefclient from cef_binary_3.3626.1883.g00e6af4_linux64 and it is working fine.