[Bug 60178] New: indowless transparent NPAPI plugin content is cleared to blank and not repainted when the host window is deactivated or a popup appears; only physically moving the window restores it. Works correctly on Windows.
http://bugs.winehq.org/show_bug.cgi?id=60178 Bug ID: 60178 Summary: indowless transparent NPAPI plugin content is cleared to blank and not repainted when the host window is deactivated or a popup appears; only physically moving the window restores it. Works correctly on Windows. Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@list.winehq.org Reporter: aiyakiss@163.com Target Milestone: --- Distribution: --- Wine 11.15 (Staging), x86_64, wow64 - Ubuntu 26.04 LTS, GNOME (Mutter / X11 session), DPI 120 - Host application: Chanjet T+ Browser (Chromium ~60 based, 2018 build), 32-bit PE - Run flags: `--enable-npapi --disable-gpu --disable-gpu-compositing --disable-direct-composition --disable-accelerated-2d-canvas --disable-direct-write --force-color-profile=srgb` ## The plugin - NPAPI plugin `npBillOne.dll`, **windowless + transparent** mode (implements `IOleInPlaceSiteWindowless`; renders via `CreateDIBSection` + `AlphaBlend`) - The plugin draws its print-preview content directly into the browser page area (there is no separate top-level HWND for the preview document). ## Steps to reproduce 1. Launch the browser and open a document, then open the plugin's print preview (the preview content renders correctly at first). 2. Do ONE of the following: - move the mouse pointer out of the browser window (window loses focus), or - open the plugin's drop-down menu (printer / paper list). 3. Observe the preview content area. ## Actual result The plugin-drawn preview area is cleared to **white/blank** and is **never repainted**, even though the window is still visible. The rest of the page (normal Chromium content) renders fine — only the windowless plugin region is affected. ## Expected result The plugin region should keep its content (as on Windows) or be repainted automatically. ## Workaround (the only thing that restores the content) **Physically drag/move the window.** A real window move makes Chromium repaint the windowless plugin region and the content reappears. Neither of the following reproduces the fix: ## What was tested (all FAILED to restore the content) 1. `RedrawWindow(hwnd, NULL, 0, RDW_INVALIDATE | RDW_ALLCHILDREN)` → repaints only ~1/5 (left strip) of the plugin region. 2. `SetWindowPos(..., SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE)` → no effect. 3. `SetWindowPos` with a real 1px move → no effect (window does not actually relocate). 4. `_NET_MOVERESIZE_WINDOW` client message (multiple gravity values) → WM refuses to move the window. 5. XTest synthetic `MotionNotify` over the region → no effect. 6. XTest synthetic window-drag gesture (title-bar drag / Super+drag) → no effect (Mutter ignores synthetic input for window-move gestures). ## Diagnostic evidence collected - The host window's surface clip region stays the full window at all times (`update_surface_region` region == full client rect). No surface replacement, no `client_surface`/GL activity — the app is pure GDI. - Sending `XClearArea(exposures=True)` on the window does not restore it (Expose → repaint keeps the already-white content), proving Wine's surface is intact; the blank region is because the windowless plugin is simply not asked to redraw. - A genuine interactive window move (which generates `WM_WINDOWPOSCHANGED` + move/expose sequence through the WM) is the only thing that makes Chromium re-invoke the plugin paint. ## Analysis / hypothesis On deactivation (`WM_ACTIVATEAPP` false / `WM_KILLFOCUS`) or when a popup is shown, the windowless plugin region is invalidated, but Wine does not deliver the repaint in a way that makes the (Chromium 60) host re-invoke the plugin's paint callback. On Windows the same sequence repaints correctly. The discrepancy appears to be in how Wine forwards invalidation/paint for the windowless-plugin region during activation change / popup handling. ## Additional notes - Actual printing (via Spooler + XPS virtual printer) works; only the on-screen preview is affected. - NPAPI is deprecated, but Wine still advertises windowless NPAPI support, hence the report. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60178 Austin English <austinenglish@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|indowless transparent NPAPI |Windowless transparent |plugin content is cleared |NPAPI plugin content is |to blank and not repainted |cleared to blank and not |when the host window is |repainted when the host |deactivated or a popup |window is deactivated or a |appears; only physically |popup appears; only |moving the window restores |physically moving the |it. Works correctly on |window restores it |Windows. | -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60178 Ken Sharp <imwellcushtymelike@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |11.15 --- Comment #1 from Ken Sharp <imwellcushtymelike@gmail.com> --- Now try with vanilla Wine. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla