Announcement

Collapse
No announcement yet.

Going Indepth With Wayland Sub-Surfaces

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Alex Sarmiento View Post
    Uh, the application should NOT care about the desktop neither the particular compositor . From a user point of view, minimizing only means "get out of my sight, quickly ". Neither the protocol nor the compositor should tell the application how it must respond to that kind of demands from the user. Maybe i misunderstood, but you seems to imply that the concept of minimizing depends on each compositor. But that's crazy . So i hope that is not what you meant
    Not the concept, but the implementation. Some just want a "get out of my sight" minimize, some others want a fancy animation while it gets out, some others want it to keep rendering (for example, to render thumbnails as suggested), while others will want it to avoid rendering if it is not in sight, as it would be just wasted energy if you don't care about what's happening. Thus, it depends on the compositor. Thus, the protocol doesn't mandate how it should work. As the only part caring about minimizing is the compositor, this features belongs in it, and not inside the protocol. The only thing the app might care about (but I don't see a practical way of enforcement) is if they should keep rendering or can just avoid it, and for that you can use simple hints between compositors and apps, that allow the application to skip frames if the hint for that is given.
    Another reasonable question would be why would you use a hint instead of providing this messaging mechanism within the core protocol, and my answer is that it might make more sense, as this should be optional for both the compositor and the application: there are good reasons to want the app to keep rendering and there are good reasons to not want that.

    Comment


    • #17
      The point is, since currently all wayland apps have client side decorations, there is the need of a protocol to let the client ask the compositor to minimize it when the user click on the minimize button. That is not in the wl_shell_surface protocol, so you can't minimize any wayland app currently, on any compositor (again, when clicking on the minimize button in the decoration. A compositor can still minimize a window if the operation is started by the compositor itself, like clicking on a "minimize" entry in the context menu of the task bar.). The xdg_shell protocol that is being worked on will have that feature.

      Comment


      • #18
        Originally posted by mrugiero View Post
        Not the concept, but the implementation. Some just want a "get out of my sight" minimize, some others want a fancy animation while it gets out, some others want it to keep rendering (for example, to render thumbnails as suggested), while others will want it to avoid rendering if it is not in sight, as it would be just wasted energy if you don't care about what's happening. Thus, it depends on the compositor. Thus, the protocol doesn't mandate how it should work. As the only part caring about minimizing is the compositor, this features belongs in it, and not inside the protocol. The only thing the app might care about (but I don't see a practical way of enforcement) is if they should keep rendering or can just avoid it, and for that you can use simple hints between compositors and apps, that allow the application to skip frames if the hint for that is given.
        Another reasonable question would be why would you use a hint instead of providing this messaging mechanism within the core protocol, and my answer is that it might make more sense, as this should be optional for both the compositor and the application: there are good reasons to want the app to keep rendering and there are good reasons to not want that.

        No, is there any way for applications to know whenever a user demands "minimization" under wayland? . Obviously, how the system renders the minimization is irrelevant for the protocol and the application itself , like fancy zoom or genie effects. For X or Y reasons that have nothing to do with rendering , an application might like to know when is being minimized.

        Comment


        • #19
          Not yet, but the xdg_shell protocol will have that.

          Comment


          • #20
            Originally posted by Alex Sarmiento View Post
            For X or Y reasons that have nothing to do with rendering , an application might like to know when is being minimized.
            Such as?

            Comment


            • #21
              Originally posted by giucam View Post
              Not yet, but the xdg_shell protocol will have that.
              Cool! Yes,now i got it

              Comment


              • #22
                Originally posted by Alex Sarmiento View Post
                For X or Y reasons that have nothing to do with rendering , an application might like to know when is being minimized.
                I'd say that application is badly designed, as it violates the separation of concerns: the only relevant things I can think of for wanting to know if the applications are minimized or not, are window management concerns, and those should be worked within the compositor. But again, this is handled as some other user pointed out by the xdg_shell extension, or could be easily hinted in a standard fashion, as a lot of window management related states are hinted in the X world nowadays.

                Comment


                • #23
                  Originally posted by mrugiero View Post
                  I'd say that application is badly designed, as it violates the separation of concerns: the only relevant things I can think of for wanting to know if the applications are minimized or not, are window management concerns, and those should be worked within the compositor. But again, this is handled as some other user pointed out by the xdg_shell extension, or could be easily hinted in a standard fashion, as a lot of window management related states are hinted in the X world nowadays.
                  "Separation of concerns " is precisely why the protocol and the compositor should not assume what the application is supposed to do when is minimized . The only concern of these is how to render the minimization , is not? .

                  You are talking like if Wayland is supposed to implement some general guidelines to the rest of the applications , but in reality , most applications should not care if wayland exist at all .

                  Comment


                  • #24
                    Originally posted by Alex Sarmiento View Post
                    "Separation of concerns " is precisely why the protocol and the compositor should not assume what the application is supposed to do when is minimized . The only concern of these is how to render the minimization , is not? .
                    Of course. That's why I'm talking about hinting, and not about forcing. A hint is that: you tell the application "you have been minimized, if you need that information to decide something, you've got it, do whatever you like with it". The compositor decides how to minimize, but not what happens inside the application once it is minimized.

                    You are talking like if Wayland is supposed to implement some general guidelines to the rest of the applications , but in reality , most applications should not care if wayland exist at all .
                    Applications should care about what they are running on. You can abstract it, but eventually, some layer will deal with it. And yes, Wayland is supposed to implement some general guidelines: how you communicate with the compositor or display server.

                    Comment


                    • #25
                      Originally posted by mrugiero View Post
                      I'd say that application is badly designed, as it violates the separation of concerns: the only relevant things I can think of for wanting to know if the applications are minimized or not, are window management concerns, and those should be worked within the compositor. But again, this is handled as some other user pointed out by the xdg_shell extension, or could be easily hinted in a standard fashion, as a lot of window management related states are hinted in the X world nowadays.
                      When Skype is minimized it displays the camera in a little widget on the corner of the screen.

                      Media players like Rhythmbox could display notifications when a new song is played only if the player is minimized.

                      Comment


                      • #26
                        Originally posted by Alex Sarmiento View Post
                        "Separation of concerns " is precisely why the protocol and the compositor should not assume what the application is supposed to do when is minimized . The only concern of these is how to render the minimization , is not?
                        Minimization is a window management task, therefore it is up to the window manager to decide how minimization should be handled. Only the compositor knows whether minimized apps needs to show thumbnails, and thus whether they need to continue rendering. Only the compositor knows the shape, size, position, of such thumbnails. Only the compositor knows whether they should be real-time or show a static image. Only the compositor knows whether windows will be included in an expose or alt-tab switcher, and whether those will be real-time or static images.

                        The app only needs to know whether it needs to render or not. Everything else is up to the compositor.

                        Originally posted by uid313 View Post
                        When Skype is minimized it displays the camera in a little widget on the corner of the screen.
                        Things like that are exactly why people get so pissed off with skype. It is not up to the app to decide those sorts of things. If the compositor wants to provide that sort of thing, then it can provide it. But apps should not be fighting the user to prevent them from minimizing or closing their apps. That sort of thing can be provided by a standard API and leave it up to the compositor to decide exactly how it should be represented, if at all.

                        Originally posted by uid313 View Post
                        Media players like Rhythmbox could display notifications when a new song is played only if the player is minimized.
                        Again, app notifications should be handled by a notification API. There are many situations besides minimization where an app might not be visible and the compositor would want to show notifications. There is no way for the app to know exactly how it is being represented, so it shouldn't try to guess.

                        Comment


                        • #27
                          Originally posted by TheBlackCat View Post
                          Things like that are exactly why people get so pissed off with skype. It is not up to the app to decide those sorts of things. If the compositor wants to provide that sort of thing, then it can provide it. But apps should not be fighting the user to prevent them from minimizing or closing their apps. That sort of thing can be provided by a standard API and leave it up to the compositor to decide exactly how it should be represented, if at all.
                          I think it is a great feature!
                          (As long as it can be turned off)

                          Not sure how this could be done by the compositor...

                          Comment


                          • #28
                            An IM client might show you as "away" when minimized, a RSS reader might optimize by not checking as often when minimized, and so on. It doesn't have to be rendering-related.

                            Comment


                            • #29
                              Originally posted by curaga View Post
                              An IM client might show you as "away" when minimized, a RSS reader might optimize by not checking as often when minimized, and so on. It doesn't have to be rendering-related.
                              Yeah, just as web browsers disable rendering and animation on inactive tabs when using window.requestAnimationFrame().

                              Comment


                              • #30
                                Originally posted by TheBlackCat View Post
                                Minimization is a window management task, therefore it is up to the window manager to decide how minimization should be handled. Only the compositor knows whether minimized apps needs to show thumbnails, and thus whether they need to continue rendering. Only the compositor knows the shape, size, position, of such thumbnails. Only the compositor knows whether they should be real-time or show a static image. Only the compositor knows whether windows will be included in an expose or alt-tab switcher, and whether those will be real-time or static images.

                                The app only needs to know whether it needs to render or not. Everything else is up to the compositor.
                                Is Wayland utterly trying to gnome-ize the linux desktop then? Neither the protocol nor the compositor should make assumptions about what minimization means ,is or should be for applications in general . The job of compositor is to 'paint' the application and nothing else .

                                Quote Originally Posted by uid313 View Post
                                When Skype is minimized it displays the camera in a little widget on the corner of the screen.
                                Things like that are exactly why people get so pissed off with skype. It is not up to the app to decide those sorts of things. If the compositor wants to provide that sort of thing, then it can provide it. But apps should not be fighting the user to prevent them from minimizing or closing their apps. That sort of thing can be provided by a standard API and leave it up to the compositor to decide exactly how it should be represented, if at all.
                                That is none of your business nor Wayland's business nor the compositor's business . "Separation of concerns " See?. That's a choice made by the developer, it does not matters if you like to or not. And what do you meant by "standard API"?

                                Comment

                                Working...
                                X