MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / setup_devtools_window

Function setup_devtools_window

core/src/browser/devtools.cc:16–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14static std::unordered_map<int, void *> devtools_map_{};
15
16static void setup_devtools_window(void *handle)
17{
18#if OS_WIN
19 HWND window = static_cast<HWND>(handle);
20 HWND rclient = static_cast<HWND>(browser::window);
21
22 // Copy window icon.
23 HICON hicon = (HICON)SendMessageW(rclient, WM_GETICON, ICON_BIG, 0);
24 SendMessageW(window, WM_SETICON, ICON_SMALL, (LPARAM)hicon);
25 SendMessageW(window, WM_SETICON, ICON_BIG, (LPARAM)hicon);
26
27 // Ensure dark theme.
28 if (window::is_dark_theme())
29 window::set_theme(window, true);
30
31 // Fix window content.
32 RECT rc; GetClientRect(window, &rc);
33 SetWindowPos(window, NULL, 0, 0,
34 rc.right - 5, rc.bottom, SWP_NOMOVE | SWP_FRAMECHANGED);
35#elif OS_MAC
36 // TODO: fix window icon & title bar
37#endif
38}
39
40struct DevToolsLifeSpan : CefRefCount<cef_life_span_handler_t>
41{

Callers 1

_on_after_createdMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected