feat: Add application icon, remove the Wayland helper for input source names, and simplify the UI by removing the HTML header.

This commit is contained in:
2026-02-23 07:27:23 +01:00
parent 9128515454
commit ff013b206a
3 changed files with 4 additions and 27 deletions

BIN
client/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@@ -246,9 +246,6 @@
</style> </style>
</head> </head>
<body> <body>
<div class="header">
<h1>Broadcaster Client</h1>
</div>
<div class="main-content"> <div class="main-content">
<!-- Left Column: Controls --> <!-- Left Column: Controls -->

View File

@@ -9,6 +9,7 @@ function createWindow() {
const win = new BrowserWindow({ const win = new BrowserWindow({
width: 1000, width: 1000,
height: 800, height: 800,
icon: path.join(__dirname, 'icon.png'),
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'preload.js'), preload: path.join(__dirname, 'preload.js'),
nodeIntegration: false, nodeIntegration: false,
@@ -49,29 +50,8 @@ ipcMain.handle('get-sources', async () => {
fetchWindowIcons: true fetchWindowIcons: true
}); });
// Wayland Workaround: If we only see generic "WebRTC PipeWire capturer" windows, // Note: On Wayland, source names come from the ScreenCast portal directly.
// try to fetch real window titles via our python helper // The wayland-helper override was removed because it returned stale/incorrect window titles.
try {
const genericNames = ['webrtc pipewire capturer', 'screen 1', 'screen 2'];
const hasGeneric = inputSources.some(s => genericNames.includes(s.name.toLowerCase()));
if (hasGeneric || inputSources.length === 1) {
const { execSync } = require('child_process');
const pyPath = path.join(__dirname, 'wayland-helper.py');
const out = execSync(`python3 ${pyPath}`, { timeout: 2000 }).toString();
const waylandWindows = JSON.parse(out);
if (waylandWindows && waylandWindows.length > 0) {
// If we only have 1 capturer source (common on Wayland compositors),
// rename it to the first active window title we found to be helpful.
if (inputSources.length === 1 && waylandWindows[0].title) {
inputSources[0].name = waylandWindows[0].title;
}
}
}
} catch (e) {
console.error("Wayland helper failed:", e.message);
}
return inputSources.map(source => ({ return inputSources.map(source => ({
id: source.id, id: source.id,