13#pragma GCC diagnostic ignored "-Wunused-parameter"
14#pragma GCC diagnostic ignored "-Wshadow"
19#include "include/cef_config.h"
27#include "include/base/cef_logging.h"
28#include "include/cef_browser.h"
30int x11_errhandler( Display *dpy, XErrorEvent *err )
33 if (err->error_code == BadWindow) {
36 }
else if (err->error_code == BadMatch && err->request_code == 42) {
39 }
else if (err->error_code == BadDrawable && err->request_code == 14) {
45 XGetErrorText( dpy, err->error_code, errstr,
sizeof(errstr) );
46 printf(
"X11 Error: %d opcode: %d info: %s\n", err->error_code, err->request_code, errstr );
53 XSetErrorHandler( x11_errhandler );
59 std::string titleStr(title);
62 ::Display *display = cef_get_xdisplay();
66 ::Window window = browser->GetHost()->GetWindowHandle();
67 DCHECK(window != kNullWindowHandle);
70 const char *kAtoms[] = {
"_NET_WM_NAME",
"UTF8_STRING"};
72 int result = XInternAtoms(display,
const_cast<char **
>(kAtoms), 2,
false, atoms);
76 XChangeProperty(display, window, atoms[0], atoms[1], 8, PropModeReplace,
77 reinterpret_cast<const unsigned char *
>(titleStr.c_str()), titleStr.size());
83 XStoreName(display, browser->GetHost()->GetWindowHandle(), titleStr.c_str());
88 ::Display *display = cef_get_xdisplay();
89 if (!display)
return false;
92 ::Window window = browser->GetHost()->GetWindowHandle();
93 if (window == kNullWindowHandle)
98 printf(
" bad window in XResizeWindow\n");
103 printf(
" bad values in XResizeWindow %d %d\n",
width,
height);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
static bool PlatformResize(CefRefPtr< CefBrowser > browser, int width, int height)
void PlatformTitleChange(CefRefPtr< CefBrowser > browser, const CefString &title)
static void PlatformInit()