From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2CA9F159C9B for ; Wed, 7 Aug 2024 18:33:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 693592BC07D; Wed, 7 Aug 2024 18:33:21 +0000 (UTC) Received: from smtp.hosts.co.uk (smtp.hosts.co.uk [85.233.160.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0620B2BC044 for ; Wed, 7 Aug 2024 18:33:20 +0000 (UTC) Received: from host86-157-72-169.range86-157.btcentralplus.com ([86.157.72.169] helo=[192.168.1.65]) by smtp.hosts.co.uk with esmtpa (Exim) (envelope-from ) id 1sblTL-0000000047a-2SAR for gentoo-user@lists.gentoo.org; Wed, 07 Aug 2024 19:33:19 +0100 Message-ID: <24118d7c-8b8b-4d8b-ab81-517f33dca31e@youngman.org.uk> Date: Wed, 7 Aug 2024 19:33:19 +0100 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [gentoo-user] Lots of issues with wayland To: gentoo-user@lists.gentoo.org References: <224010fd-7999-4e67-860a-a2b62d792dab@gmail.com> <6dcedd86-4db4-4c04-adb8-d63fe93e2822@kotiaho.net> <86cymllppj.fsf@gentoo.org> <8f1b3b69-c08c-4024-b359-ddfa24760a29@youngman.org.uk> Content-Language: en-GB From: Wol In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 0b19031c-431d-47a0-aa07-899acd782aac X-Archives-Hash: 25fcf8988ef2ab223351674a9302388b On 07/08/2024 14:53, Alan Mackenzie wrote: > Hello, Wol. > > On Tue, Aug 06, 2024 at 23:08:42 +0100, Wol wrote: >> On 06/08/2024 19:31, Alan Mackenzie wrote: >>> So, is it possible in Wayland to record a configuration of windows, >>> their sizes and positions, then restore these on starting a program >>> again? If not, that would appear to be a design bug in Wayland. What >>> am I missing? > >> That - unlike X - is because windows cannot say where they are going to >> go. They can *ask* where they want to go, which isn't the same thing. > > How does it differ in practice? Under what circumstances would a > request to display a window at a particular place result in it being > displayed somewhere else? It probably doesn't make much difference most of the time. Where it particularly makes a difference is, I believe, modal windows, and windows which demand to be placed "on top". In Windows or X, a window which demands to be placed on top of everything else will get what it asks for. And it doesn't give a monkeys about what the user is actually doing at the time. With Wayland, if the user says "I want this window on top", then the application can't over-ride it - Wayland will force it to pop-under. > >> Iirc, X behaves like Windows, which means applications can *seize* >> focus, which drives me up the wall on occasion at work. I'll have an >> Excel macro running, which takes maybe 3 or 4 minutes. So I go into >> let's say Slack. Excel triggers something (google drive?) which grabs >> focus and disappears, so all of a sudden I *think* I'm gaily typing into >> Slack. But focus has been stolen and I'm typing into a vacuum - >> EXTREMELY frustrating, especially as I don't actually know what's going on. > > I don't understand what these issues with focus have to do with > positioning a window. Though I can appreciate them causing problems. > There would appear to be a clash between Wayland running within a > GNU/Linux running as a Windows subsystem, and the Windows itself - > presumably Windows allows a Windows application to steal focus from a > Wayland application in this situation. > >> In Wayland, you can't steal focus. But as a side effect, it's Wayland >> that controls the window, not the application. So Wayland is more >> secure, but that comes with unavoidable side effects that you don't like... > > How does Wayland controling the Window lead to an application program's > inability to position it? I can't see the connection. Because Wayland (or rather the user, through Wayland) DICTATES what the application is allowed to do. In practice it may not make much difference. But the user CAN tell Wayland "this space is reserved for AppA", and if AppB comes along and says "I want to put my window over AppA", Wayland will tell it to bugger off. It's basically Wayland's security stance - if I the user *think* I am interacting with AppA, Wayland blocks AppB from taking over and tricking me into eg leaking my password. All you need is an app with a hidden window that seizes focus when it sees a password pop-up appear, and your secrets are leaked ... > > Just as a bit of context; I've not yet tried Wayland, and for most of my > work (including Emacs) use a Linux console. > I've tried to switch to Wayland, but as you can tell I haven't necessarily managed it... Cheers, Wol