-
Notifications
You must be signed in to change notification settings - Fork 61
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
Allow multiple viewports on Wayland platform #646
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psaavedra
force-pushed
the
psaavedra/multiple_viewports
branch
3 times, most recently
from
November 5, 2023 14:04
f16ac8d
to
c624e03
Compare
psaavedra
force-pushed
the
psaavedra/multiple_viewports
branch
from
November 5, 2023 14:07
c624e03
to
079b778
Compare
psaavedra
changed the title
Allow multiple viewports
Allow multiple viewports on Wayland platform
Nov 5, 2023
psaavedra
force-pushed
the
psaavedra/multiple_viewports
branch
from
November 5, 2023 14:52
079b778
to
4bbbf32
Compare
psaavedra
force-pushed
the
psaavedra/multiple_viewports
branch
6 times, most recently
from
November 7, 2023 10:34
62b8a48
to
5b9507f
Compare
Disassociate the configuration respect of the creation of the platform.
Optionally, platform plug-in implementations can provide their own viewport class by overriding the CogPlatform.get_viewport_type method.
... for convinience.
psaavedra
force-pushed
the
psaavedra/multiple_viewports
branch
from
November 8, 2023 11:06
5b9507f
to
1782f29
Compare
Convenient reference to make explicit and accessible what is the Viewport where the CogView is attached.
Code now uses the CogViewport assigned to the CogView instead of the global CogViewport reference inside of the Platform.
The cog_wl_platform_popup_create() uses the information of the viewport for setting the surface. The viewport in use will be the one associated to the View.
The input method context is now defined and assigned to the View once this is added to a Viewport, in cog_viewport_add(). Before is not possible since we need to have access to the wl_surface associated to the Viewport->Window for configuring the IM context.
Added new functons in the CogShell API for handling multiple Viewport: * cog_shell_viewport_lookup(CogShell *, CogViewportKey); * cog_shell_viewport_new(CogShell *, CogViewportKey); * cog_shell_viewport_remove(CogShell *, CogViewportKey); Also added the CogShell::create-viewport signal. This signal is emitted when the shell creates a new a new CogViewport. Handling this signal allows to customize the actions required to be done during the creation of a new viewport. This modifies the behaviour of the 'cog_shell_get_viewport()'. This creates a default viewport in order to keep the current behavior. This creation of the default viewport is lazy and it is delayed until the invokation of the 'cog_shell_get_viewport()'. Finally, this also clarifies how the launcher based on Cog should to perform the start-up: 1. Create the Platform 2. Create the Shell 3. Configure the platform using the created Shell 4. Shell startup (see documentation in 'cog_launcher_startup()').
... and reset the reference in the Platform if the destroyed popup is the same.
Add a new multiple-stack example program which shows how to attach 2 viewports to the CogShell. Each viewport iterates over a couple of views.
Gets if the view is visible inside of the viewport where the view is attached. Returns: True if the view is visible in its viewport and false in any other case.
Set the view as the one visible inside of the viewport where the view is attached.
... on pointer_on_enter, touch_on_down and keyboard_on_enter. It can be possible a race condition during the destruction of a CogView if, during this action, the UI-process is receiving and trying to process an input event. Under this scenario, the wl_surface associated could be not longer there so the input handler will receive a null-pointer (0x0). Backtrace: ``` 0 0x6f45a3bc in wl_proxy_get_user_data (proxy=proxy@entry=0x0) at ../wayland/src/wayland-client.c:2135 at /usr/include/wayland-client-protocol.h:3393 fixed_x=0, fixed_y=5, surface=0x0, data=0x6cf09088) <<<<<<<<<<<<< ```
Support the ivi-application protocol, adding two new cog_wl_viewport_set_id() and cog_wl_viewport_get_id() functions. If the ivi-application protocol is being used, it will set the identifier for the surface associated to the window, otherwise it is a no-op. Based on a patch originally from Claudio Saavedra <[email protected]> and Adrian Perez de Castro <[email protected]>.
In some unstable compisitors it could be posible to receive touch up/motion evebts inmediatelly after a touch up (touch deini the touch target).
Set the priority of PwlSource to G_PRIORITY_HIGH+30 to handle Wayland events as quick as possible. Based on a patch originally from Adrian Perez de Castro <[email protected]>.
…rget_changed handler
psaavedra
force-pushed
the
psaavedra/multiple_viewports
branch
from
November 15, 2023 11:26
1782f29
to
0189933
Compare
Replaced by #675 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
viewport class by overriding the CogPlatform.get_viewport_type method.