all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Clément Pit--Claudel" <clement.pit@gmail.com>,
	"Arthur Miller" <arthur.miller.no1@gmail.com>
Cc: 25408@debbugs.gnu.org
Subject: bug#25408: Remove Decorations Around Emacs Frame (Windows OS)
Date: Sun, 12 Feb 2017 12:13:17 +0100	[thread overview]
Message-ID: <58A0434D.6030206@gmx.at> (raw)
In-Reply-To: <301ed349-64c7-12c6-d843-e73eb1e20e83@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5066 bytes --]

 > Thanks! The patch applied cleanly and everything compiled fine.

Thanks for testing.  Please tell me your build and window manager types.

 > ✓, although if I create a frame with no-focus-on-map I then need a
 > call to raise-frame to raise it — even if its z-group is 'above.
 > Maybe when z-group is "above" the frame should be automatically
 > raised?

Not so here (with a GTK 3.4.2 build on Debian running xfwm).  Evaluating

(make-frame '((no-focus-on-map . t) (z-group . above)))

makes a new frame on top of the existing one regardless of whether xfwm
is set up to use focus follows mouse or not.

We probably have to investigate that further.

 > ✓, although it would be nice to automatically raise the frame when
 > x-group is above.  I can call raise-frame, but it doesn't work
 > correctly when the frame is invisible (and setting the visibility to t
 > before raising the frame doesn't work either).

I mentioned that: When a frame is made invisible, its z-group is reset
to nil by the window system or manager.  x_set_z_group can't cope with
that because the last line of

x_set_z_group (struct frame *f, Lisp_Object new_value, Lisp_Object old_value)
{
   if (!EQ (new_value, old_value))

still assumes that the frame is "above".  For the moment try with

(set-frame-parameter frame 'z-group nil)
...
(set-frame-parameter frame 'z-group 'above)

as a workaround.  I'm not yet sure whether it's better to (1) have
x_make_frame_invisible and x_iconify_frame reset the z-group parameter
explicitly, (2) change x_set_z_group so it always issues a request to
the window system, or (3) remove the z-group parameter and make the
z-group setting an option of the `frame-restack' function.

Unfortunately, the z-group equivalents in X 11 are a complete mess: You
can put a window simultaneously in the ‘above’ and the ‘below’ groups
and it notwhere says what should prevail and what happens when you later
remove a window from one of these groups (I trioed to avoid this dilemma
with the z-group concept).  And restacking may probably remove a window
from these groups and maybe not allow to put it there and so on ...

And why not avoid z-groups at all?  Because you cannot simply restack a
frame on top of the "active" frame.  If you try (via a foucs-in-hooked
function) you will see that your window system uses up all available
resources because the window system wants to raise the active frame and
Emacs wants to raise the other one.  So to put a frame on top of the
"active" frame you have to put that frame in the ‘above’ group.

 > * Creating a frame is rather slow; the following is an excerpt of a profile:
 >
 >                 - make-frame                                       442  29%
 >                  - frame-creation-function                         440  29%
 >                   - apply                                          440  29%
 >                    - #<compiled 0x4862dd>                          440  29%
 >                     - x-create-frame-with-faces                    440  29%
 >                      - face-set-after-frame-default                307  20%
 >                       - face-spec-recalc                           276  18%
 >                        - make-face-x-resource-internal             217  14%
 >                         - set-face-attributes-from-resources       213  14%
 >                          - set-face-attribute-from-resource        190  12%
 >                           - face-name                              126   8%
 >                            + check-face                            118   7%
 >                        + face-spec-reset-face                       44   2%
 >                        + face-spec-set-2                             7   0%
 >                         set-face-attribute                           8   0%
 >                    normal-erase-is-backspace-setup-frame                  2   0%

But isn't that the problem I tried to tackle (for tooltip frames) with
the option ‘tooltip-reuse-hidden-frame’?  All this face-related stuff is
an ecological disaster IMHO.  Here, creating a tooltip frame caused up
to two GC cycles before I added that option.

So as a rule create your frames (lazily) once for each session and hide
them when you don't need them.

 > * Frames with z-group set to 'above are not automatically raised when
 > no-focus-on-map is set, so I need to call x-raise-frame on them; this
 > doesn't work when they are invisible (instead it makes them visible
 > without raising them, it seems).

I hope I described the problem and a workaround above.  I attach my
functions for testing attached frames so you can see how I handle this
currently.

 > * Creating a frame / making it visible uses my WM's frame creating animation — is there a way to disable this (x-show-tip doesn't have it)?

No idea.  I can look into that (as a rule I turn off all animations
here).  Do you use GTK tooltips or Emacs' native ones?

martin

[-- Attachment #2: synch-frame-x.el --]
[-- Type: application/emacs-lisp, Size: 14587 bytes --]

  parent reply	other threads:[~2017-02-12 11:13 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 22:20 bug#25408: Remove Decorations Around Emacs Frame (Windows OS) Arthur Miller
2017-01-10  8:23 ` martin rudalics
2017-01-10 17:07   ` Eli Zaretskii
2017-01-10 18:07     ` martin rudalics
2017-01-10 18:27       ` Eli Zaretskii
2017-01-10 20:39         ` Clément Pit--Claudel
2017-01-11  7:08           ` Arthur Miller
2017-01-11  7:24             ` Arthur Miller
2017-01-11  7:48               ` Arthur Miller
2017-01-11  7:50                 ` Arthur Miller
2017-01-11  8:15                   ` Arthur Miller
2017-01-11  8:39                 ` martin rudalics
2017-01-11  9:17                   ` Arthur Miller
2017-01-11 10:20                     ` Arthur Miller
2017-01-11 13:55                       ` martin rudalics
2017-02-07  5:28                   ` Clément Pit--Claudel
2017-02-07  6:53                     ` martin rudalics
2017-02-07 13:05                       ` Clément Pit--Claudel
2017-02-11 14:27                         ` martin rudalics
2017-02-11 21:02                           ` Clément Pit--Claudel
2017-02-11 21:10                             ` Clément Pit--Claudel
2017-02-12 11:13                             ` martin rudalics [this message]
2017-02-15 19:49                               ` Arthur Miller
2017-02-16  8:04                                 ` martin rudalics
2017-02-16 13:22                                   ` Arthur Miller
2017-02-16 14:06                                     ` Arthur Miller
2017-02-17  7:03                                       ` martin rudalics
2017-02-17  7:03                                     ` martin rudalics
2017-04-12  9:27                               ` martin rudalics
2017-05-06  0:06                                 ` Clément Pit-Claudel
2017-05-06  7:13                                   ` Eli Zaretskii
2017-05-06 13:26                                     ` Clément Pit-Claudel
2017-05-06  7:40                                   ` martin rudalics
2017-05-06  9:41                                     ` martin rudalics
2017-05-06 13:28                                       ` Clément Pit-Claudel
2017-05-06 14:20                                         ` Eli Zaretskii
2017-05-06 21:01                                           ` Clément Pit-Claudel
2017-05-07  2:30                                             ` Eli Zaretskii
2017-05-07  8:41                                           ` martin rudalics
2017-05-07  8:40                                         ` martin rudalics
2017-05-07 17:19                                           ` Eli Zaretskii
2017-05-07 18:07                                             ` martin rudalics
2017-05-07 18:33                                               ` Eli Zaretskii
2017-05-08  6:48                                                 ` martin rudalics
2017-05-08 14:41                                                   ` Eli Zaretskii
2017-06-25 11:02                                   ` martin rudalics
2017-06-25 16:23                                     ` Clément Pit-Claudel
2017-04-12 17:38                           ` Alan Third
2017-04-12 19:13                             ` martin rudalics
2017-04-12 19:51                               ` Alan Third
2017-04-13  7:10                                 ` martin rudalics
2017-04-13 10:30                                   ` Alan Third
2017-04-13 11:56                                     ` martin rudalics
2017-04-15 16:29                                   ` Alan Third
2017-04-15 19:39                                     ` martin rudalics
2017-04-17 14:56                                       ` bug#25408: Remove Decorations Around Emacs Frame (NS port) Alan Third
2017-04-17 15:43                                         ` martin rudalics
2017-04-17 16:21                                           ` Alan Third
2017-04-17 17:20                                             ` martin rudalics
2017-04-17 18:55                                               ` Alan Third
2017-04-19  7:26                                                 ` martin rudalics
2017-04-19 14:33                                                   ` Alan Third
2017-04-19 16:01                                                     ` martin rudalics
2017-04-19 17:04                                                       ` Alan Third
2017-04-19 18:07                                                         ` martin rudalics
2017-06-10 15:38                                                           ` Alan Third
2017-06-11  8:10                                                             ` martin rudalics
2017-06-11 16:35                                                               ` Alan Third
2017-06-12  6:09                                                                 ` martin rudalics
2017-06-12 17:59                                                                   ` Alan Third
2017-06-13  7:24                                                                     ` martin rudalics
2017-06-22  9:10                                                                     ` martin rudalics
2017-06-25 14:22                                                                       ` Alan Third
2017-06-25 15:58                                                                         ` martin rudalics
2017-07-15 21:27                                                                           ` Alan Third
2017-07-16  8:28                                                                             ` martin rudalics
2017-04-19 11:24                                         ` Anders Lindgren
2017-04-19 12:50                                           ` martin rudalics
2017-04-19 13:51                                           ` Alan Third
2017-01-11  8:38             ` bug#25408: Remove Decorations Around Emacs Frame (Windows OS) martin rudalics
2017-01-11 16:39             ` Richard Stallman
2017-01-10 19:36 ` Richard Stallman
2017-01-11 13:50 ` bug#25408: SV: " arthur.miller.no1
2017-01-11 13:57   ` martin rudalics
2017-01-11 14:59 ` arthur.miller.no1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58A0434D.6030206@gmx.at \
    --to=rudalics@gmx.at \
    --cc=25408@debbugs.gnu.org \
    --cc=arthur.miller.no1@gmail.com \
    --cc=clement.pit@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.