From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akira Kyle Newsgroups: gmane.emacs.devel Subject: Re: Removing the `window-id' frame parameter on non-Core Input platforms Date: Sun, 19 Dec 2021 19:25:36 -0700 Message-ID: References: <87y24ifpkj.fsf.ref@yahoo.com> <87y24ifpkj.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25033"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 20 03:26:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mz8Nh-0006Jz-AF for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Dec 2021 03:26:29 +0100 Original-Received: from localhost ([::1]:45092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mz8Ng-0003dO-Cf for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 21:26:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mz8N5-0002m1-Nc for emacs-devel@gnu.org; Sun, 19 Dec 2021 21:25:51 -0500 Original-Received: from mail-lf1-f51.google.com ([209.85.167.51]:45010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mz8N3-0006wa-SN for emacs-devel@gnu.org; Sun, 19 Dec 2021 21:25:51 -0500 Original-Received: by mail-lf1-f51.google.com with SMTP id g26so2500088lfv.11 for ; Sun, 19 Dec 2021 18:25:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C2R8GXtBmlNuoCWtTvsbBgIb4qfiRNDGUzgVpaegtaU=; b=tbyJAinoxvL/VOjT+6SKcImshXZ3bGObrJYcmw9ppgP81UY6Mis+gmj0f/Czv8fmWo w45+bJaZaHC4EGHD7cO+vrRNmMM0pbUS7Xc0Q4W4gQCiblfMghKSYgrLFld3GY2/28pp EPiw/rBDFVXJ7aOJN+vncj9pdInPdROi0gPqLbjVEaiZcxG7zSWWtmgu2hkRonyxoGnS VR+Ppi0bPoZULAU6mEaycyMo8jDpWkrrFcA1MpzUNwKozOALFBX4eb1Tr/0krGy+pzYE TscnpjcLwbHaLRySvugzCrHDipFUW/xEsObPbEDrEJotZZmGPpe0AF8SCO+q6kv/qlrY 739g== X-Gm-Message-State: AOAM53192SXU1dBz7V6/Hkh/VWQurO57DIQcf6VJjq0J9Zzn7BHQJhR4 H3IawSXaKDAyWblCHmI/e8kYixKzH5377Q== X-Google-Smtp-Source: ABdhPJw0rjl5fDW6eUP+9rf5AYZYs2TANKl+K7G9Wzom9eohsJsJq1xk3NzoMvC6zBBPZno7Srir4Q== X-Received: by 2002:a05:6512:1049:: with SMTP id c9mr2987002lfb.253.1639967147933; Sun, 19 Dec 2021 18:25:47 -0800 (PST) Original-Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id t23sm2209550lfg.63.2021.12.19.18.25.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Dec 2021 18:25:47 -0800 (PST) Original-Received: by mail-lf1-f52.google.com with SMTP id br40so15906459lfb.1 for ; Sun, 19 Dec 2021 18:25:47 -0800 (PST) X-Received: by 2002:a05:6512:2311:: with SMTP id o17mr898839lfu.429.1639967147651; Sun, 19 Dec 2021 18:25:47 -0800 (PST) In-Reply-To: <87y24ifpkj.fsf@yahoo.com> X-Gmail-Original-Message-ID: Received-SPF: pass client-ip=209.85.167.51; envelope-from=aikokyle@gmail.com; helo=mail-lf1-f51.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:282486 Archived-At: On Fri, Dec 17, 2021 at 10:31 PM Po Lu wrote: > > The only platform where it is useful is X with Core Input, where third > party programs can use it to manipulate a frame's X Window. > > This is safe on Core Input, but on XInput 2 I'd like the freedom to > change the underlying X window of a frame after it is created to work > around some difficult GTK related problems, which will make continuing > to support the `window-id' parameter unreasonable. Touch event tracking > on XInput2 also requires that no non-Emacs code modify a window created > by Emacs to work correctly. > > On non-X platforms, `window-id' is just a pointer which is even more > useless, so I'd like to make this code in frame.c conditional on > HAVE_X_WINDOWS && !HAVE_XINPUT2: > > w = (uintptr_t) FRAME_NATIVE_WINDOW (f); > store_in_alist (alistptr, Qwindow_id, > make_formatted_string (buf, "%"PRIuMAX, w)); > > Does that look OK to you? > emacs-webkit uses the pointer obtained via 'window-id' on pgtk builds to help identify the correct gtk container widget containing contents of the emacs frame that should become the parent of the webkit widget. It's a bit of a hack but would be potentially more difficult without this pointer. I also know that EAF uses the 'widow-id' parameter on x+gtk builds in order to allow Qt widgets to be reparented onto emacs frames. Also a slight tangent, but Po, do you plan to make xwidgets work on pgtk? I'm wondering that since you've been trying to revive the xwidget code and fixed the flickering issues on x+gtk, that xwidgets are looking more like they are here to stay as a potentially non-experimental feature? If that's the case, then I think I'd like to then just integrate the work I've done on emacs-webkit into a pgtk version of xwidgets? I think one of the key differences between the codes are the osr versus one-to-one buffer-webkit view models.