ESC does not work for PPAPI flash in OSR mode in cefclient

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

ESC does not work for PPAPI flash in OSR mode in cefclient

Postby vicluo » Wed Apr 19, 2017 3:14 am

Hi,
I build cefclient.exe from 3.2987.1601.gf035232 in Debug mode on VS2015 Win64. If I launch cefclient with
Code: Select all
--enable-system-flash
and visit http://www.miramedgs.com/images/communique_files/winter2016/, click fullscreen, then press `ESC`, cefclient will leave fullscreen mode as expected. However, if I launch it with
Code: Select all
--enable-system-flash --off-screen-rendering-enabled
and repeat above steps, `ESC` won't work at all.

Is this a bug in OSR mode? Is there any method that we can modify only cefclient to fix it?

Thanks
vicluo
Newbie
 
Posts: 3
Joined: Wed Apr 19, 2017 3:04 am

Re: ESC does not work for PPAPI flash in OSR mode in cefclie

Postby Czarek » Sat Apr 29, 2017 11:54 am

I can give you hints how to debug it. In client_handler.cc edit OnPreKeyEvent and print all properties of the "event" variable - for when you press Escape key. It will be called multiple times with different event types. Print this information when running cefclient in windowed mode. Now check how it behaves in OSR mode. Edit osr_window_win.cc and its OnKeyEvent and print information of the "event" variable before it is sent to CEF. You should send to CEF similar events that you printed when running in windowed mode. If there are some events missing, then maybe you need to edit OsrWindowWin::OsrWndProc and intercept some more messages, maybe you also need to handle WM_UNICHAR or something? Try google and have fun!
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: ESC does not work for PPAPI flash in OSR mode in cefclie

Postby vicluo » Tue May 02, 2017 4:22 am

Czarek wrote:I can give you hints how to debug it. In client_handler.cc edit OnPreKeyEvent and print all properties of the "event" variable - for when you press Escape key. It will be called multiple times with different event types. Print this information when running cefclient in windowed mode. Now check how it behaves in OSR mode. Edit osr_window_win.cc and its OnKeyEvent and print information of the "event" variable before it is sent to CEF. You should send to CEF similar events that you printed when running in windowed mode. If there are some events missing, then maybe you need to edit OsrWindowWin::OsrWndProc and intercept some more messages, maybe you also need to handle WM_UNICHAR or something? Try google and have fun!


Unfortunately they gave out the same key event sequence in both normal and OSR mode.

Code: Select all
-      _cef_key_event_t   {type=KEYEVENT_RAWKEYDOWN (0x00000000) modifiers=0x00000000 windows_key_code=0x0000001b ...}   _cef_key_event_t
      type   KEYEVENT_RAWKEYDOWN (0x00000000)   cef_key_event_type_t
      modifiers   0x00000000   unsigned int
      windows_key_code   0x0000001b   int
      native_key_code   0x40010001   int
      is_system_key   0x00000000   int
      character   0x001b '\x1b'   wchar_t
      unmodified_character   0x001b '\x1b'   wchar_t
      focus_on_editable_field   0x00000000   int

-      _cef_key_event_t   {type=KEYEVENT_CHAR (0x00000003) modifiers=0x00000000 windows_key_code=0x0000001b ...}   _cef_key_event_t
      type   KEYEVENT_CHAR (0x00000003)   cef_key_event_type_t
      modifiers   0x00000000   unsigned int
      windows_key_code   0x0000001b   int
      native_key_code   0x40010001   int
      is_system_key   0x00000000   int
      character   0x001b '\x1b'   wchar_t
      unmodified_character   0x001b '\x1b'   wchar_t
      focus_on_editable_field   0x00000000   int


Bug: https://bitbucket.org/chromiumembedded/ ... -to-esc-in
vicluo
Newbie
 
Posts: 3
Joined: Wed Apr 19, 2017 3:04 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 102 guests