Skip to content

Commit c20b242

Browse files
Azvya Erstevanryanthemanuel
Azvya Erstevan
andauthored
misc: allow HiDPI Screen running wayland to use cypress window/browser (#29366)
* misc: allow HiDPI Screen running wayland to use cypress window/browser * Added changelog entry * Fix changelog entry release date to pending * Changed release changelog entry to actual date * Added issue number to the changelog entry * fix tests * update changelog --------- Co-authored-by: Ryan Manuel <[email protected]>
1 parent 0772844 commit c20b242

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

cli/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ _Released 8/13/2024 (PENDING)_
1111
**Misc:**
1212

1313
- Updated `cypress open` hints displayed after Cypress binary install. Addresses [#29935](https://github.com/cypress-io/cypress/issues/29935).
14+
- Allow HiDPI Screen running wayland to use cypress window/browser by adding `--ozone-platform=auto` flag to the electron's runtime argument. Addresses [#20891](https://github.com/cypress-io/cypress/issues/20891).
1415

1516
## 13.13.2
1617

cli/lib/exec/spawn.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ module.exports = {
155155

156156
const { onStderrData } = overrides
157157
const envOverrides = util.getEnvOverrides(options)
158-
const electronArgs = []
158+
const electronArgs = ['--ozone-platform=auto']
159159
const node11WindowsFix = isPlatform('win32')
160160

161161
let startScriptPath

cli/test/lib/exec/spawn_spec.js

+4
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ describe('lib/exec/spawn', function () {
121121
return spawn.start('--foo', { foo: 'bar' })
122122
.then(() => {
123123
expect(cp.spawn).to.be.calledWithMatch('/path/to/cypress', [
124+
'--ozone-platform=auto',
124125
'--',
125126
'--foo',
126127
'--cwd',
@@ -148,6 +149,7 @@ describe('lib/exec/spawn', function () {
148149
const args = cp.spawn.firstCall.args.slice(0, 2)
149150
// it is important for "--no-sandbox" to appear before "--" separator
150151
const expectedCliArgs = [
152+
'--ozone-platform=auto',
151153
'--no-sandbox',
152154
'--',
153155
'--foo',
@@ -173,6 +175,7 @@ describe('lib/exec/spawn', function () {
173175
.then(() => {
174176
expect(cp.spawn).to.be.calledWithMatch('node', [
175177
p,
178+
'--ozone-platform=auto',
176179
'--',
177180
'--foo',
178181
'--cwd',
@@ -198,6 +201,7 @@ describe('lib/exec/spawn', function () {
198201
.then(() => {
199202
expect(cp.spawn).to.be.calledWithMatch('node', [
200203
p,
204+
'--ozone-platform=auto',
201205
'--',
202206
'--foo',
203207
'--cwd',

0 commit comments

Comments
 (0)