Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add window states API #2473

Merged
merged 301 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
301 commits
Select commit Hold shift + click to select a range
ab9b778
Minor modifications
proneon267 May 22, 2024
0a90a12
Minor modifications
proneon267 May 22, 2024
73721b3
Minor modifications
proneon267 May 22, 2024
c809698
Fixed bug on Window.close()
proneon267 May 23, 2024
06b7f2a
Fixed dummy backend
proneon267 May 23, 2024
11fea69
Fixed tests
proneon267 Jun 1, 2024
938504c
Minor cleanup
proneon267 Jun 1, 2024
be87113
Code Cleanup
proneon267 Jun 1, 2024
9aefd30
Merge branch 'window_states' of https://github.com/proneon267/toga in…
proneon267 Jun 1, 2024
13d2ff3
Merge branch 'beeware:main' into window_states
proneon267 Jun 1, 2024
176e879
Code Cleanup
proneon267 Jun 1, 2024
1ba73b8
Merge branch 'window_states' of https://github.com/proneon267/toga in…
proneon267 Jun 1, 2024
d4bfdaa
Restart CI for Linux Testbed failure
proneon267 Jun 1, 2024
d993b80
Merge branch 'main' into window_states
proneon267 Jun 12, 2024
38bf5c3
Updated to latest main branch
proneon267 Jun 12, 2024
b710eaf
Parameterized test on core
proneon267 Jun 16, 2024
b461295
Merge branch 'main' into window_states
proneon267 Jun 16, 2024
0c7900b
Updating to latest main branch
proneon267 Jun 16, 2024
97a6c66
Changed attribute to is_presentation_mode
proneon267 Jun 16, 2024
ba28194
Misc cleanup
proneon267 Jun 16, 2024
c7320ce
Name cleanups
proneon267 Jun 16, 2024
aed5251
Modified as per review
proneon267 Jun 17, 2024
a76bf9b
Added _PLATFORM_ALLOWS_CLOSE attribute on required backends
proneon267 Jun 17, 2024
f0d5d80
Handled deprecation warning on testbed tests
proneon267 Jun 17, 2024
e416f20
Removed explicit closing from dummy backend
proneon267 Jun 17, 2024
1fa8cde
100% coverage on core
proneon267 Jun 17, 2024
6350b5f
100% coverage on Android & iOS
proneon267 Jun 17, 2024
d091955
Restart CI for windows failure
proneon267 Jun 17, 2024
5c2a53b
Merge branch 'main' into window_states
proneon267 Jun 23, 2024
564c5ed
Updated to latest `main` branch
proneon267 Jun 23, 2024
e36e596
Delete changes/1857.bugfix.rst
proneon267 Jun 23, 2024
174d66b
Merge branch 'beeware:main' into window_states
proneon267 Jun 26, 2024
17564a8
Fixed testbed failures
proneon267 Jun 26, 2024
51cea93
Restart CI for pre-commit failure
proneon267 Jun 26, 2024
feb78a8
 
proneon267 Jun 26, 2024
4632738
Merge branch 'window_states' of https://github.com/proneon267/toga in…
proneon267 Jun 26, 2024
8286b86
 
proneon267 Jun 26, 2024
16d5758
Fix testbed for macOS
proneon267 Jun 26, 2024
5b59b14
Wayland test
proneon267 Jun 26, 2024
85dd202
Fix testbed for wayland
proneon267 Jun 26, 2024
552c0fc
Fix testbed for wayland
proneon267 Jun 26, 2024
56edec1
Restart CI for macOS
proneon267 Jun 26, 2024
971b8da
Merge branch 'main' into window_states
proneon267 Jun 27, 2024
934b6b1
Updated to latest main branch
proneon267 Jun 27, 2024
1e6bd76
Merge branch 'main' into window_states
proneon267 Jun 29, 2024
426e8b9
Updated to latest main branch
proneon267 Jun 29, 2024
ccef113
Merge branch 'beeware:main' into window_states
proneon267 Jul 4, 2024
4d83d19
Update changes/1857.removal.rst
proneon267 Jul 4, 2024
067e988
Update core/src/toga/constants/__init__.py
proneon267 Jul 4, 2024
3c84a80
Update core/src/toga/app.py
proneon267 Jul 4, 2024
a276f22
Various changes as per review: 1
proneon267 Jul 4, 2024
78cdd3b
Various changes as per review: 2
proneon267 Jul 4, 2024
b9e87c5
Various changes as per review: 3
proneon267 Jul 4, 2024
06d5a9e
Various changes as per review: 4
proneon267 Jul 4, 2024
b0c37fe
Various changes as per review: 5
proneon267 Jul 4, 2024
09ee428
Various changes as per review: 6
proneon267 Jul 4, 2024
1bd1f39
Various changes as per review: 7
proneon267 Jul 5, 2024
2b6d347
Added new tests as per review: 8
proneon267 Jul 5, 2024
8bba100
Minor change on cocoa
proneon267 Jul 6, 2024
6b3e883
Added tests as per review: 9
proneon267 Jul 6, 2024
74685d1
Restored to app presentation mode test to non-parameterized form to c…
proneon267 Jul 6, 2024
25c420f
Fixed testbed failures
proneon267 Jul 6, 2024
83dcab4
Minor change on testbed
proneon267 Jul 6, 2024
ab0ed45
Fixed cocoa backend and tests
proneon267 Jul 6, 2024
4fa4af6
Fixed dummy backend
proneon267 Jul 6, 2024
71f4314
Fixed gtk test backend
proneon267 Jul 7, 2024
a308ea7
Fixed core and added new test
proneon267 Jul 7, 2024
42642ee
Fixed winforms
proneon267 Jul 7, 2024
6b513c7
Fixed gtk backend
proneon267 Jul 7, 2024
ccc8f11
Fixed Android backend
proneon267 Jul 7, 2024
56f32a7
Test to diagnose wayland failure
proneon267 Jul 7, 2024
5da8231
Removed diagnostic tests
proneon267 Jul 7, 2024
4c6070d
Diagnostic test
proneon267 Jul 9, 2024
cfa255a
Various code cleanups
proneon267 Jul 9, 2024
87383f3
Fixed core
proneon267 Jul 10, 2024
c3f32c7
Minor cleanup
proneon267 Jul 9, 2024
4b2fdbb
Removed diagnostic tests
proneon267 Jul 7, 2024
b592ee2
Added review notes
proneon267 Jul 10, 2024
a5891e8
Fixed testbed tests
proneon267 Jul 10, 2024
e8ad898
100% coverage
proneon267 Jul 10, 2024
8684038
Removed diagnostic code
proneon267 Jul 10, 2024
1b53c16
diagnosing failure
proneon267 Jul 10, 2024
3cebc76
Revert change
proneon267 Jul 10, 2024
d2510e0
Merge branch 'window_states' of https://github.com/proneon267/toga in…
proneon267 Jul 10, 2024
4485cda
100% coverage
proneon267 Jul 10, 2024
d0dcb35
Merge branch 'beeware:main' into window_states
proneon267 Jul 16, 2024
f429307
Removed overspecified assertions and test
proneon267 Jul 25, 2024
6aedeea
changed is_presentation_mode to in_presentation_mode
proneon267 Jul 25, 2024
d7228ba
skipped some tests on the unimplemented iOS backend
proneon267 Jul 25, 2024
600e4c9
Modified cocoa implementation
proneon267 Jul 29, 2024
3689314
Typo fix on cocoa
proneon267 Jul 29, 2024
1a6b4ad
Merge branch 'beeware:main' into window_states
proneon267 Jul 29, 2024
2885d1c
Typo fix on cocoa
proneon267 Jul 29, 2024
cd9e00b
Typo fix on cocoa
proneon267 Jul 29, 2024
57fd1e3
Merge branch 'window_states' of https://github.com/proneon267/toga in…
proneon267 Jul 29, 2024
7835fe8
Fix cocoa
proneon267 Jul 29, 2024
1c0a969
Implemented new window states handling on cocoa and gtk
proneon267 Aug 6, 2024
cf23ce9
Fixed cocoa implementation
proneon267 Aug 6, 2024
e6f4dcc
Reimplemented on cocoa backend
proneon267 Aug 10, 2024
30e5968
Reimplemented on winforms
proneon267 Aug 12, 2024
c623254
 
proneon267 Aug 12, 2024
f2bd750
 
proneon267 Aug 12, 2024
11444e3
Reimplemented on gtk
proneon267 Aug 14, 2024
0771349
Update 1857.feature.rst
proneon267 Aug 14, 2024
c9b7b90
Removed unncessary complexity from cocoa implementation
proneon267 Aug 14, 2024
3441cb3
Misc fixes
proneon267 Aug 14, 2024
62dcd7d
Update cocoa/src/toga_cocoa/window.py
proneon267 Aug 15, 2024
4f36f28
proneon267 Aug 15, 2024
ea8058a
Update test_window.py
proneon267 Aug 15, 2024
11c3ec3
Reimplemented on cocoa backend
proneon267 Aug 16, 2024
0bd68c4
Reimplemented on gtk
proneon267 Aug 16, 2024
edef651
Merge branch 'beeware:main' into window_states
proneon267 Aug 16, 2024
3c8b0f1
Correcting test failure on cocoa
proneon267 Aug 17, 2024
e915d72
Correcting test failure on cocoa
proneon267 Aug 17, 2024
fb6e657
Correcting test failure on cocoa
proneon267 Aug 17, 2024
b810d65
Correcting test failure on cocoa
proneon267 Aug 17, 2024
1e59da1
Correcting test failure on cocoa
proneon267 Aug 17, 2024
9dba56b
Fix delegate error on cocoa
proneon267 Aug 17, 2024
56cc124
Fixing delegate error on cocoa
proneon267 Aug 17, 2024
2d29072
Add check guards for invalid impl on cocoa delegate
proneon267 Aug 17, 2024
c2e88e5
Removed unused state flags from gtk
proneon267 Aug 17, 2024
279dfda
Removed unused branch in cocoa implementation
proneon267 Aug 17, 2024
73bf7aa
Added checks for wayland
proneon267 Aug 18, 2024
af6a292
Added checks for wayland
proneon267 Aug 18, 2024
5a0352f
Minor gtk fix
proneon267 Aug 19, 2024
ef68572
Added no cover for wayland
proneon267 Aug 19, 2024
ca48ba2
parameterized tests on core
proneon267 Aug 20, 2024
cd8eba2
Reimplemented on Android
proneon267 Aug 20, 2024
e5eff2b
Merge branch 'main' into window_states
proneon267 Aug 20, 2024
26eb01c
Use the new wayland detection
proneon267 Aug 20, 2024
3a6aaf7
Removed legacy code from window example.
proneon267 Aug 20, 2024
78b5ddf
Added checks for wayland
proneon267 Aug 20, 2024
e0f5bf0
Minor fix on testbed
proneon267 Aug 20, 2024
54cfaab
Restart CI for intermittent failures
proneon267 Aug 20, 2024
8b8685e
Removed unused flags from Android implementation
proneon267 Aug 20, 2024
d599730
Merge branch 'window_states' of https://github.com/proneon267/toga in…
proneon267 Aug 20, 2024
91b70da
Reorganized test
proneon267 Aug 20, 2024
b38ff03
Merge branch 'beeware:main' into window_states
proneon267 Aug 20, 2024
2cf1839
Merge branch 'main' into window_states
proneon267 Aug 29, 2024
aa120e9
Resolving file conflicts with main branch
proneon267 Aug 29, 2024
3661110
Merge branch 'main' into window_states
proneon267 Sep 3, 2024
c928ac1
Fixed cocoa delegate
proneon267 Sep 3, 2024
f9c18f5
Modified testbed test
proneon267 Sep 9, 2024
ace13ce
Testing native OS delay for each platform
proneon267 Sep 10, 2024
ef7b3dc
Restart CI as previous run dropped by intermittent failure
proneon267 Sep 10, 2024
bc19c7f
Re-running CI to confirm cocoa errors are consistently produced
proneon267 Sep 10, 2024
c2235f7
Testing native OS delay for each platform
proneon267 Sep 10, 2024
b0ead86
Removed unused flag from gtk
proneon267 Sep 10, 2024
7bbf330
Restart CI for intermittent failures
proneon267 Sep 10, 2024
0f7fe4f
Removed unused flag on gtk
proneon267 Sep 10, 2024
7308e11
Enable presentation and fullscreen mode on wayland
proneon267 Sep 11, 2024
8f858be
Enable skipped test on wayland
proneon267 Sep 11, 2024
9f95554
Merge branch 'window_states' of https://github.com/proneon267/toga in…
proneon267 Sep 11, 2024
295cd59
Fix test timing
proneon267 Sep 11, 2024
5bd410e
Restart CI for intermittent failures
proneon267 Sep 11, 2024
00a742e
Delay tests according to native platforms
proneon267 Sep 11, 2024
4ef9c50
Covered missing coverage
proneon267 Sep 12, 2024
a1613be
Covered missing coverage
proneon267 Sep 12, 2024
138d0e3
Covered missing coverage
proneon267 Sep 13, 2024
450efad
Added XFAIL for iOS
proneon267 Sep 13, 2024
51d3590
Replace use of app_probe.redraw with window_probe.wait_for_window
proneon267 Sep 13, 2024
3de8eef
Moved presentation implementation on cocoa to window from app
proneon267 Sep 16, 2024
77e2b7e
Removed miniaturization delay from cocoa
proneon267 Sep 16, 2024
7db80d2
Removed miniaturization delay from cocoa
proneon267 Sep 16, 2024
aaee1f9
Ensuring coverage on macOS
proneon267 Sep 16, 2024
903860b
Ensuring coverage on macOS
proneon267 Sep 16, 2024
a6df392
Ensuring coverage on macOS
proneon267 Sep 19, 2024
f9f1375
Merge branch 'main' into window_states
proneon267 Sep 19, 2024
ad427ab
Ensuring coverage on macOS
proneon267 Sep 19, 2024
56de33d
Ensuring coverage on macOS
proneon267 Sep 19, 2024
59012cd
Ensuring coverage on macOS
proneon267 Sep 19, 2024
5a66725
Merge branch 'beeware:main' into window_states
proneon267 Sep 25, 2024
bb22a9f
Ensuring coverage on macOS
proneon267 Sep 25, 2024
f6a851d
Modified rapid state switching delay timing
proneon267 Sep 25, 2024
35bbb8e
Resolve error
proneon267 Sep 25, 2024
8bddf0e
Ensuring coverage on macOS
proneon267 Sep 25, 2024
03dd538
Update core/src/toga/window.py
proneon267 Sep 25, 2024
2af1509
Modified to correct expected error in test
proneon267 Sep 25, 2024
8b56d66
Clarified reasoning comment regarding state checks being performed at…
proneon267 Sep 27, 2024
7cd1489
Clarified reasoning comment regarding state checks being performed at…
proneon267 Sep 27, 2024
598021f
Modified testbed tests
proneon267 Sep 27, 2024
596acc4
Removed unused probe method from backends
proneon267 Sep 29, 2024
d3f90ba
Removed repeated tests
proneon267 Sep 29, 2024
945caf5
Removed repeated tests
proneon267 Sep 29, 2024
116eec3
Checking for coverage issues on macOS
proneon267 Sep 29, 2024
71aec38
Added no-cover on cocoa
proneon267 Sep 29, 2024
2559fa0
Improved tests
proneon267 Sep 30, 2024
d822ff0
Added platform notes
proneon267 Oct 2, 2024
14b64b7
Added platform notes
proneon267 Oct 3, 2024
d8c8422
Improved tests on mobile platform
proneon267 Oct 3, 2024
bb513d3
Merge branch 'beeware:main' into window_states
proneon267 Oct 3, 2024
eb2d9a5
Apply suggestions from code review
proneon267 Oct 7, 2024
abfa707
corrected pre-commit issues
proneon267 Oct 7, 2024
8f7c954
Moved implementation of app presentation mode to core from backends
proneon267 Oct 7, 2024
379e002
Removed unused code from dummy backend
proneon267 Oct 7, 2024
e3f31ff
corrected core tests
proneon267 Oct 7, 2024
383e027
Restart CI for intermittent Android failures
proneon267 Oct 7, 2024
c986e3d
Improved tests
proneon267 Oct 8, 2024
5f365c6
Improved tests
proneon267 Oct 8, 2024
2961507
Moved same state transition tests to core
proneon267 Oct 8, 2024
9ca14ed
Improved tests
proneon267 Oct 8, 2024
b6edc2a
Restart CI for Intermittent Android failure
proneon267 Oct 8, 2024
0f74ad9
Merge branch 'beeware:main' into window_states
proneon267 Oct 12, 2024
589e3c7
Restart CI for intermittent Android failures
proneon267 Oct 12, 2024
621c723
Restart CI for intermittent Android failures
proneon267 Oct 12, 2024
655a146
Restart CI for intermittent Android failures
proneon267 Oct 12, 2024
4f2f2a5
Debugging android CI failure
proneon267 Oct 13, 2024
c29ab39
Merge branch 'window_states' of https://github.com/proneon267/toga in…
proneon267 Oct 13, 2024
0d67322
Debugging android CI failure
proneon267 Oct 13, 2024
07e82f9
replaced with
proneon267 Oct 15, 2024
8be4d8d
replaced with
proneon267 Oct 15, 2024
1692a0d
added new method on window probe
proneon267 Oct 15, 2024
f8ee69d
Revert commented code
proneon267 Oct 15, 2024
b82b6d0
Revert
proneon267 Oct 15, 2024
247847e
Corrected probe method on android
proneon267 Oct 15, 2024
1b624ad
Merge branch 'beeware:main' into window_states
proneon267 Oct 16, 2024
5560e3d
Diagnosing macOS-arm64 failures
proneon267 Oct 16, 2024
a8fed19
Merge branch 'beeware:main' into window_states
proneon267 Oct 18, 2024
5f0c1a2
Correcting testbed failure
proneon267 Oct 18, 2024
136cdcf
Removed unused android code
proneon267 Oct 21, 2024
8fcdbd6
Fixed testbed for macOS
proneon267 Oct 25, 2024
ef584b1
Fixed testbed for Android
proneon267 Oct 25, 2024
7f28348
Enable additional test cases
proneon267 Oct 25, 2024
6e0c091
Removed stray comments
proneon267 Oct 25, 2024
f535cd6
Restart CI for intermittent Android failure
proneon267 Oct 25, 2024
c175b6a
Fix Android delay
proneon267 Oct 25, 2024
bc1f902
Added note on state setter
proneon267 Oct 27, 2024
e8864d5
Merge branch 'beeware:main' into window_states
proneon267 Oct 28, 2024
0f0103c
Merge branch 'beeware:main' into window_states
proneon267 Nov 5, 2024
4162e4b
Fixed window size after restoration to NORMAL state on wayland
proneon267 Nov 7, 2024
eb51730
Fixed window size setting on wayland
proneon267 Nov 7, 2024
b25b902
Revert changes
proneon267 Nov 7, 2024
8df6c4b
Add delay to prevent glitching on wayland
proneon267 Nov 7, 2024
1097207
Removed intermediate states from mobile test
proneon267 Nov 8, 2024
7e7cc1e
Merge branch 'main' into window_states
proneon267 Nov 11, 2024
e01237a
Correct probe property
proneon267 Nov 12, 2024
3236559
Separated test
proneon267 Nov 19, 2024
ef8725b
Simplified test cases
proneon267 Nov 19, 2024
9520809
Merge branch 'main' into window_states
proneon267 Nov 19, 2024
4ff1fd0
Pre-commit fix
proneon267 Nov 19, 2024
0931280
Removed unused fixture
proneon267 Nov 19, 2024
2024626
Modified delay indicator name
proneon267 Nov 20, 2024
91a8f72
Modified delay duration
proneon267 Nov 20, 2024
68b0a44
Removed stray comments
proneon267 Nov 20, 2024
0d807f6
Ignore window state requests on a hidden window
proneon267 Nov 28, 2024
9add077
Ignore window resize requests while in fullscreen or presentation state.
proneon267 Nov 28, 2024
35a49a1
Merge branch 'main' into window_states
proneon267 Nov 29, 2024
c7ce202
Ignore window position requests while in fullscreen or presentation s…
proneon267 Nov 29, 2024
23319cf
Added docstrings
proneon267 Nov 29, 2024
5b5e44a
Reduce test cases for rapid state assignment
proneon267 Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor cleanup
  • Loading branch information
proneon267 committed Jun 1, 2024
commit 938504c0d52c9dade007edc8225a17b0e3a376ae
14 changes: 6 additions & 8 deletions gtk/src/toga_gtk/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,9 @@ def set_window_state(self, state):
elif current_state == WindowState.PRESENTATION:
if isinstance(self.native, Gtk.ApplicationWindow):
self.native.set_show_menubar(True)
if self.native_toolbar:
self.native_toolbar.set_visible(True)
else: # pragma: no cover
pass
# self.native_toolbar is always set to Gtk.Toolbar(), so no need
# to check if self.native_toolbar exists.
self.native_toolbar.set_visible(True)
self.native.unfullscreen()

self.interface.screen = self._before_presentation_mode_screen
Expand All @@ -270,10 +269,9 @@ def set_window_state(self, state):
self._before_presentation_mode_screen = self.interface.screen
if isinstance(self.native, Gtk.ApplicationWindow):
self.native.set_show_menubar(False)
if self.native_toolbar:
self.native_toolbar.set_visible(False)
else: # pragma: no cover
pass
# self.native_toolbar is always set to Gtk.Toolbar(), so no need
# to check if self.native_toolbar exists.
self.native_toolbar.set_visible(False)
self.native.fullscreen()
self._is_in_presentation_mode = True
else: # pragma: no cover
Expand Down
Loading