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

Introduce CogViewport, add support in the Wayland plug-in and example program #644

Merged
merged 4 commits into from
Nov 3, 2023

Commits on Nov 2, 2023

  1. core: Introduce the CogViewport container

    Add a new CogViewport class, which represents a container (e.g. a
    window, output surface, GTK widget, etc.) which can display one web
    view out from a group. The container can itself be observable using
    its "add" and "remove" signals, tracks a "visible" view, and ensures
    that only the visible view has the "visible" state flag enabled.
    aperezdc committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    4562f3b View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2023

  1. shell: Replace the single view with a CogViewport

    Use a CogViewport instead of a single web view. This will allow the
    current platform plug-ins to show in their output one of many views
    without needing many changes.
    
    Note that in the future platform plug-ins should be updated to avoid
    using globals and make them handle multiple viewports (e.g. windows)
    as well.
    aperezdc committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    a5aeda9 View commit details
    Browse the repository at this point in the history
  2. examples: Add "viewport" example program

    Add an examples/ subdirectory, and a new simple-stack example program
    which shows how to attach multiple views to the CogShell view stack
    and switch among them.
    aperezdc committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    ded1a97 View commit details
    Browse the repository at this point in the history
  3. wl: Support multiple web views

    Replace the single view saved in the CogWlPlatform by the viewport
    being used by the shell, taking care that only the visible view gets
    to update the contents of the Wayland surface and that input events
    get sent to the visible view as well.
    
    There are some locations where the visible view is assumed to be also
    the focused one, which may not be true later on when multiple viewports
    are supported. This compromise is okay for the time being and may need
    to be revisited later on.
    aperezdc committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    5ebdb45 View commit details
    Browse the repository at this point in the history