unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 6468@debbugs.gnu.org
Subject: bug#6468: A couple of problem related to frame raising (partly w32)
Date: Sun, 20 Jun 2010 01:36:47 +0200	[thread overview]
Message-ID: <AANLkTik_hjID8KN9YDJ_H4OtTD4V3GKzJr6lPm-cKidg@mail.gmail.com> (raw)
In-Reply-To: <AANLkTil6cV6uvanCuvxiY1pC0mx6VbZEsL892Y60FYTr@mail.gmail.com>

On Sat, Jun 19, 2010 at 10:50 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Sat, Jun 19, 2010 at 22:32, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>> I often do not have them. It is mostly not that kind of problem I am reporting.
>
> Then don't be surprised if other people, who does not see the problem,
> have even more trouble understanding what you're talking about.

I am never surprised by that. When I am telling about a complicated
problem I am merely asking for a starting point in the discussion.
Have others seen similar problems? Do they have any guesses? Have they
tried to investigate some part of the problem?

>> Some problems, like the "jumping scrolling" seems hard to understand
>> though I have given all logically necessary details.
>
> Of course not. When you say that, and someone who knows a lot more
> than you about redisplay (Eli) asks you for clarification, the
> principle of parsimony suggests that either you have *not* given all
> logically necessary details, or you have *failed* at transmiting that
> information.


I seldom look into redisplay internals so I hope Eli knows it better.
(I have done it a couple of times looking at certain bugs but I have
not taken it up here I think.)

This is not about the internals of redisplay. It is about the logic
between narrow_to_region etc and redisplay.


>> What do you want me to do then?
>
> Explain things again, more clearly, and help those that try to help
> you, instead of resorting to complains about people wasting your time.


I think both of us has tried the best we can but we have got stuck at
this moment.

I am saying that the best way to solve the problem is to think in
those tracks I have described. I think Eli believes this is wrong.
(And I think Eli believe what I am saying about the original problem
is wrong.)

Perhaps it would be good if someone from outside came in and tried to
understand. But it does not help if you say that Eli understands the
problem better. I am sure Eli understands the display engine better
now, but it is only partly involved. (However understanding of it is
anyway essential of course. I have tried to ask Eli relevant questions
about the display engine.)


>> I have no recipe. I asked about the code. Was that unclear in some
>> way? Please explain why then.
>
> I tend not to understand your messages very well. Let's start with this:
>
> "I think the basic problem is that there is no hook so you can be sure
> when a call to raise-frame (and other frame functions) will work after
> frame creation. Since part of the frame creation as I understand it is
> done asynchronously be the OS/window manager I think this is a really
> basic need to get Emacs to work."


(What happens below is expected. Either you have seen those kind of
problems or not. It looks like you have not. For me this is just a
normal progress of the discussion. Is it not that for you?)


> What does mean "get Emacs to work"?


I thought I wrote that in the paragraph above the one you cite but I
have a real bad habit of not reading what I have written before
sending.

I have been trying to get a frame to become the foreground window in a
certain situation but so far failed. There are many things involved so
I am not sure of why it fails. And it does not always fail. I even
believed I found out how to get it to work but after that it has
always failed.

I have tried the normal things like raise-frame,
set-frame-select-input-focus, make-frame-visible, redisplay. And I
have tried to do it in a timer. (I think when it worked I had a rather
large timeout in the timer.)

When doing some logging I have seen that the frame setup does not seem
to be finished. The frame is created, the buffer I want to display is
somehow tied to the frame, but it does not yet have a window. I have
no idea whether this is a part of the problem I have or not.

I do think the process (i.e. Emacs) has enough privileges in my case,
but I am not sure how that kind of privilege works now since it was a
long time ago I looked into that problem and MS tend to change things
for this particular problem (to try to stop evil programs).


> you trying to say that not having some hook causes *you* trouble in
> some intended application? If so, could you please post an example of
> what you intend to do, and why is it not working?

Example?

I try to open a new frame to edit a text area in Firefox using It's
All Text. This calls emacsclient without wait (since otherwise it
hangs Firefox).

I have set server-raise-frame to nil since I want to create a special
frame for editing and just raise that. If server-raise-frame is
non-nil this will raise the current frame in Emacs instead.

So now in server-window I just create a frame and try to raise that.
And I can't get it to work.

I have a variable pointing to the frame and it looks ok so I know it is there.


>> I am asking about this part:
>>
>>       foreground_window = GetForegroundWindow ();
>>       foreground_thread = GetWindowThreadProcessId (foreground_window, NULL);
>>       if (!foreground_window
>>           || foreground_thread == GetCurrentThreadId ()
>>
>> Does not the if clause mean that if foreground_wind is not 0 then the
>> old value of foreground_thread will be erased? Or am I misreading
>> this?
>
> If foreground_window is 0, or


Ah, shit. Thanks. (I am too unused to reading C code.)


>   foreground_thread is equal to the current thread's id, or
>   the AttachThread call returns 0
> then
>   foreground_thread is set to 0
>
>    Juanma
>





  reply	other threads:[~2010-06-19 23:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-19 18:23 bug#6468: A couple of problem related to frame raising (partly w32) Lennart Borgman
2010-06-19 18:35 ` Juanma Barranquero
2010-06-19 19:14   ` Lennart Borgman
2010-06-19 19:20     ` Juanma Barranquero
2010-06-19 20:32       ` Lennart Borgman
2010-06-19 20:50         ` Juanma Barranquero
2010-06-19 23:36           ` Lennart Borgman [this message]
2010-06-19 23:58             ` Juanma Barranquero
2010-06-20  1:07               ` Lennart Borgman
2010-06-20 12:21                 ` Lennart Borgman
2010-06-21 23:19             ` Lennart Borgman
2010-06-22  8:17               ` Juanma Barranquero
2010-06-22 10:39                 ` Lennart Borgman
2010-06-22 10:58                   ` Juanma Barranquero
2010-06-23 10:17                     ` Lennart Borgman
2010-06-23 10:34                       ` Juanma Barranquero
2010-06-23 10:41                         ` Lennart Borgman
2010-06-23 10:54                           ` Juanma Barranquero
2010-06-23 11:08                             ` Lennart Borgman
2010-06-19 21:47 ` Eli Zaretskii
2011-10-06 20:35   ` Glenn Morris
     [not found] ` <handler.6468.D6468.131793333925336.notifdone@debbugs.gnu.org>
2011-10-06 20:39   ` bug#6468: closed (Re: bug#6468: A couple of problem related to frame raising (partly w32)) Lennart Borgman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=AANLkTik_hjID8KN9YDJ_H4OtTD4V3GKzJr6lPm-cKidg@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=6468@debbugs.gnu.org \
    --cc=lekktu@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).