emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fullscreen patch.


From: Jan D.
Subject: Re: Fullscreen patch.
Date: Wed, 2 Jan 2002 22:09:22 +0100 (CET)

>     +      */
>     +      if ((expect_x == 0 && abs (got_x-expect_x) > 5) ||
>     +          (expect_y == 0 && abs (got_y-expect_y) > 5))
>     +          x_set_offset (f, expect_x, expect_y, 1);
> 
> The comment needs to explain the overall reason for this code,
> not just the background info.  In general, the actions of this
> function need explaining.

This part wasn't that good, there was a race condition.  I will revork it
(or remove it) with better comments.

> 
>     +  /* Adjust for fullscreen */
>     +  if (FRAME_VISIBLE_P (f) &&
>     +      ! (f->output_data.x->want_fullscreen & old_fullscreen))
> 
> What does that last line test?  What does it mean?

It tests if we already did a fullscreen adjutment, we should not do another
one.  If for instance there was a setting in initial-frame-alist and a
command line switch.

> Could you explain to me the logic of the new code in x_real_positions?

The old code got the parent window of the emacs X window and then
translated coordinates 0,0 for that window to the root window, thus
getting the real coordinates for that window.

However, many window managers don't just intersect one window between
clients and the root window.  So the new code traversers up the
containment tree until it hits the root window.  The window before that
is the outer window manager window (this is the for-loop).

Then XGetGeometry gets the real coordinates for that window in real_x
and real_y.

After that we translate coordinates from real_x, real_y to what they
are in emacs window.  Since the real_x and real_y are outside emacs window,
win_x and win_y is negative.  -win_x and -win_y is the size of the
window manager decorations.

> Also, could you please send me the entire code?
> I can't figure out what that diff is changing.

Attached.

> 
> When sending patches to me, would you please use diff -c, not diff -u?
> I find I cannot understand a diff -u patch unless it is very simple.
> When I try to read the lines and think about what they do,
> I cannot keep track of which lines are old and which are new.

I will rework the patch and address all your comments.

        Jan D.

Attachment: x_real_positions.c
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]