List Info

Thread: Full screen mode on windows




Full screen mode on windows
country flaguser name
France
2008-05-31 06:16:55
Hello,

There is nice feature in Putty called full screen mode. It
takes away
all windows decoration including the taskbar.

I would like to implement this feature natively on emacs. I
have two
ideas for the api:

1) Either I make a function called w32-toggle-fullscreen and
do all
the right thing in C,

2) Or I could expose the GetWindowLongPtr, SetWindowLongPtr
and
SetWindowPos as lisp function and write the toggle in lisp.

Which approach is the most likely to get included?

For info here is the Putty code that does the job :

    /* Remove the window furniture. */
    style = GetWindowLongPtr(hwnd, GWL_STYLE);
    style &= ~(WS_CAPTION | WS_BORDER | WS_THICKFRAME);
    if (cfg.scrollbar_in_fullscreen)
	style |= WS_VSCROLL;
    else
	style &= ~WS_VSCROLL;
    SetWindowLongPtr(hwnd, GWL_STYLE, style);

    /* Resize ourselves to exactly cover the nearest
monitor. */
	get_fullscreen_rect(&ss);
    SetWindowPos(hwnd, HWND_TOP, ss.left, ss.top,
			ss.right - ss.left,
			ss.bottom - ss.top,
			SWP_FRAMECHANGED);

Thanks for your feedbacks.
-- 
Ivan
http://kanis.fr

Youth is a wonderful thing. What a crime to waste it on
children.
    -- George Bernard Shaw 




Re: Full screen mode on windows
country flaguser name
Sweden
2008-05-31 07:53:58
I would suggest looking at the existing fullscreen option
for X:

      (set-frame-parameter nil 'fullscreen  'fullboth)

and make that work for w32, if it doesnt already!

Ivan Kanis <expire-by-2008-06-06kanis.fr> writes:      
> Hello,
>
> There is nice feature in Putty called full screen mode.
It takes away
> all windows decoration including the taskbar.
>
> I would like to implement this feature natively on
emacs. I have two
> ideas for the api:
>
> 1) Either I make a function called
w32-toggle-fullscreen and do all
> the right thing in C,
>
> 2) Or I could expose the GetWindowLongPtr,
SetWindowLongPtr and
> SetWindowPos as lisp function and write the toggle in
lisp.
>
> Which approach is the most likely to get included?
>
> For info here is the Putty code that does the job :
>
>     /* Remove the window furniture. */
>     style = GetWindowLongPtr(hwnd, GWL_STYLE);
>     style &= ~(WS_CAPTION | WS_BORDER |
WS_THICKFRAME);
>     if (cfg.scrollbar_in_fullscreen)
> 	style |= WS_VSCROLL;
>     else
> 	style &= ~WS_VSCROLL;
>     SetWindowLongPtr(hwnd, GWL_STYLE, style);
>
>     /* Resize ourselves to exactly cover the nearest
monitor. */
> 	get_fullscreen_rect(&ss);
>     SetWindowPos(hwnd, HWND_TOP, ss.left, ss.top,
> 			ss.right - ss.left,
> 			ss.bottom - ss.top,
> 			SWP_FRAMECHANGED);
>
> Thanks for your feedbacks.
-- 
Joakim Verona



Re: Full screen mode on windows
country flaguser name
Israel
2008-05-31 08:13:14
> From: joakimverona.se
> Date: Sat, 31 May 2008 14:53:58 +0200
> Cc: emacs-develgnu.org
> 
> I would suggest looking at the existing fullscreen
option for X:
> 
>       (set-frame-parameter nil 'fullscreen  'fullboth)
> 
> and make that work for w32, if it doesnt already!

It does work, although it only emulates the fullscreen
mode.

But 

   (w32-send-sys-command #xf030)

will do exactly what the OP wants.



Re: Full screen mode on windows
country flaguser name
Sweden
2008-05-31 08:25:50
Eli Zaretskii wrote:
>> From: joakimverona.se
>> Date: Sat, 31 May 2008 14:53:58 +0200
>> Cc: emacs-develgnu.org
>>
>> I would suggest looking at the existing fullscreen
option for X:
>>
>>       (set-frame-parameter nil 'fullscreen 
'fullboth)
>>
>> and make that work for w32, if it doesnt already!
> 
> It does work, although it only emulates the fullscreen
mode.
> 
> But 
> 
>    (w32-send-sys-command #xf030)
> 
> will do exactly what the OP wants.

Maybe, but it does not do very much for me ... 

Are you sure you got the figures right?



Re: Full screen mode on windows
country flaguser name
Sweden
2008-05-31 08:52:14
Lennart Borgman (gmail) wrote:
> Eli Zaretskii wrote:
>>> From: joakimverona.se
>>> Date: Sat, 31 May 2008 14:53:58 +0200
>>> Cc: emacs-develgnu.org
>>>
>>> I would suggest looking at the existing
fullscreen option for X:
>>>
>>>       (set-frame-parameter nil 'fullscreen 
'fullboth)
>>>
>>> and make that work for w32, if it doesnt
already!
>>
>> It does work, although it only emulates the
fullscreen mode.
>>
>> But
>>    (w32-send-sys-command #xf030)
>>
>> will do exactly what the OP wants.
> 
> Maybe, but it does not do very much for me ... 
> 
> Are you sure you got the figures right?

Ah, sorry, it maximizes the screen. Nothing more magical
...



Re: Full screen mode on windows
country flaguser name
Israel
2008-05-31 10:28:08
Re: Full screen mode on windows
country flaguser name
Sweden
2008-05-31 10:50:23
Eli Zaretskii wrote:
>> Date: Sat, 31 May 2008 15:52:14 +0200
>> From: "Lennart Borgman (gmail)"
<lennart.borgmangmail.com>
>> Cc: emacs-develgnu.org, joakimverona.se, expire-by-2008-06-06kanis.fr
>>
>> Lennart Borgman (gmail) wrote:
>>> Eli Zaretskii wrote:
>>>>> From: joakimverona.se
>>>>> Date: Sat, 31 May 2008 14:53:58 +0200
>>>>> Cc: emacs-develgnu.org
>>>>>
>>>>> I would suggest looking at the existing
fullscreen option for X:
>>>>>
>>>>>       (set-frame-parameter nil
'fullscreen  'fullboth)
>>>>>
>>>>> and make that work for w32, if it
doesnt already!
>>>> It does work, although it only emulates the
fullscreen mode.
>>>>
>>>> But
>>>>    (w32-send-sys-command #xf030)
>>>>
>>>> will do exactly what the OP wants.
>>> Maybe, but it does not do very much for me ...

>>>
>>> Are you sure you got the figures right?
>> Ah, sorry, it maximizes the screen. Nothing more
magical ...
> 
> But that's what the OP wanted, isn't it?

Not sure. I thought he wanted to get rid of the title bar
too. That has 
been usual for things like this before. But you are probably
right.



Re: Full screen mode on windows
country flaguser name
France
2008-05-31 13:25:47
joakimverona.se writes:

> I would suggest looking at the existing fullscreen
option for X:
>
>       (set-frame-parameter nil 'fullscreen  'fullboth)

I will try when I get back to work.

"Lennart Borgman (gmail)" <lennart.borgmangmail.com> writes:

> Eli Zaretskii wrote:
>>> Lennart Borgman (gmail) wrote:
>>>> Eli Zaretskii wrote:
>>>>>> From: joakimverona.se
>>>>> But
>>>>>    (w32-send-sys-command #xf030)
>>>>>
>>>>> will do exactly what the OP wants.
>>>> Maybe, but it does not do very much for me
... 
>>>>
>>>> Are you sure you got the figures right?
>>> Ah, sorry, it maximizes the screen. Nothing
more magical ...
>>
>> But that's what the OP wanted, isn't it?
>
> Not sure. I thought he wanted to get rid of the title
bar too. That
> has been usual for things like this before. But you are
probably
> right.
>

I knew how to maximize with the w32-send-sys-command
command. By full
screen I mean no title bar, no windows decoration and no
taskbar.
-- 
Ivan
http://kanis.fr

Speak your mind, even if your voice shakes. Well aimed
slingshots can
topple giants.
    -- Maggie Kuhn 




Re: Full screen mode on windows
country flaguser name
Israel
2008-05-31 16:11:24
> From: Ivan Kanis <expire-by-2008-06-06kanis.fr>
> Date: Sat, 31 May 2008 20:25:47 +0200
> 
> I knew how to maximize with the w32-send-sys-command
command. By full
> screen I mean no title bar, no windows decoration and
no taskbar.

Why would you want such a thing?  If you don't want any GUI
features
at all, type Alt-RET into the Command Prompt window, and
then invoke
"emacs -nw".  Is that what you want?



Re: Full screen mode on windows
user name
2008-05-31 16:16:47
>>>>> "Eli" == Eli Zaretskii
<elizgnu.org> writes:

>> I knew how to maximize with the
w32-send-sys-command command. By full
>> screen I mean no title bar, no windows decoration
and no taskbar.

Eli> Why would you want such a thing?

I'm playing around with using this (on Linux) to do
presentations in
Emacs.  My current code is based on outline mode, but I'm
thinking of
switching to Muse.

I reported a full-screen bug a while ago for Linux... really
it would
be nice to have both "real full screen" (for
presentations) and "full
screen but not hiding the panel" (for more ordinary
Emacs-based apps,
like a gud session).

Tom



Re: Full screen mode on windows
user name
2008-05-31 20:30:35
Eli Zaretskii <elizgnu.org> writes:
>> I knew how to maximize with the
w32-send-sys-command command. By full
>> screen I mean no title bar, no windows decoration
and no taskbar.
>
> Why would you want such a thing?  If you don't want any
GUI features
> at all, type Alt-RET into the Command Prompt window,
and then invoke
> "emacs -nw".

Emacs without title bar, window decorations, or taskbar, is
still
very different than emacs in a terminal...

-Miles

-- 
In New York, most people don't have cars, so if you want to
kill a person, you
have to take the subway to their house.  And sometimes on
the way, the train
is delayed and you get impatient, so you have to kill
someone on the subway.
  [George Carlin]



Re: Full screen mode on windows
country flaguser name
France
2008-06-01 05:05:06
Eli Zaretskii <elizgnu.org> writes:

>> From: Ivan Kanis <expire-by-2008-06-06kanis.fr>
>> Date: Sat, 31 May 2008 20:25:47 +0200
>> 
>> I knew how to maximize with the
w32-send-sys-command command. By full
>> screen I mean no title bar, no windows decoration
and no taskbar.
>
> Why would you want such a thing?  If you don't want any
GUI features
> at all, type Alt-RET into the Command Prompt window,
and then invoke
> "emacs -nw".  Is that what you want?

Why? It looks good on Putty. It can be done on X, why not on
Windows?
It maximises screen estate and hides distractions so that I
can focus
on what needs to get done.

AFAIK Emacs in the command prompt will not display picture
and bdf
fonts, I use both extensively.  I don't think it has mouse
support
either which I use from time to time.
-- 
Ivan
http://kanis.fr

Academic politics is the most vicious and bitter form of
politics,
because the stakes are so low.
    -- Wallace Sayre 




Re: Full screen mode on windows
user name
2008-05-31 21:02:28
Eli Zaretskii wrote:
>> From: joakimverona.se
>> Date: Sat, 31 May 2008 14:53:58 +0200
>> Cc: emacs-develgnu.org
>>
>> I would suggest looking at the existing fullscreen
option for X:
>>
>>       (set-frame-parameter nil 'fullscreen 
'fullboth)
>>
>> and make that work for w32, if it doesnt already!
>>     
>
> It does work, although it only emulates the fullscreen
mode.
>
> But 
>
>    (w32-send-sys-command #xf030)
>
> will do exactly what the OP wants.
>   

Neither the fullscreen parameter, nor the command above
produce a full 
screen window. They both produce a maximised window that
still contains 
the window decorations, and does not overlap the taskbar.




Re: Full screen mode on windows
country flaguser name
United States
2008-06-03 01:53:25
Ivan Kanis <expire-by-2008-06-07kanis.fr> writes:

    AFAIK Emacs in the command prompt will not display
    picture and bdf fonts, I use both extensively.  I don't
    think it has mouse support either which I use from time
    to time.

I have wanted a feature like this for a long time for W32.
I started a brief gnu.emacs.help thread on the question in
March [1].  At home I use stumpwm which puts all
applications in a true fullscreen mode that maximizes
available screen area while still allowing the use of GUI
tools like the mouse and nice fonts, etc.  But at work I am
stuck with W32 and can't get that effect easily.

Also, I suspect that a nice presentation package would be
fairly easy to write for Emacs and could be quite useful,
but it would be helpful for such a program to have access
by
way of Emacs lisp to a true fullscreen toggle on all
platforms.  The problem is that the W32 environment does
not
seem to provide a high-level or easily accessed function to
do that.  An attempt seems to have been made that requires
python[2].

There is also some interest in programs like Dark Room or
Writeroom which are text editors that are designed to be
visually minimalistic for the purpose of reducing
distractions.  (There is a page on the EmacsWiki that
describes some related hacks [3].)  Emacs is evolved for
use
as a text editor for coding and some related things;
features like a totally blank screen save text (no title
bars or tool bars, etc.) seem to be of interest more to
writers of fiction and poetry, and so forth.  A related
feature that would be nice for the ``Writeroom'' editing
style, or for a presentation manager, is that of a
disappearing mode-line, similar to the ``auto-hide''
function available for the ``task-bar'' used in the Windows
GUI.  I know one attempt has been made to implement this
for
Emacs[4], though it does not reclaim that space (or
minibuffer space) for editing use, which would be nice.


Footnotes:
[1] I don't know how to cite Usenet messages.
The Google archive says it is:
Message-ID: <3112661d-c08e-412b-91f1-9e7ec192dc67s37g2000prg.googlegroups.com>
A direct link to the Google web archived thread is: 
http://groups.google.c
om/group/gnu.emacs.help/browse_thread/thread/d97ba81a2428d37
e/4e4024398a44deba?lnk=st&q=emacsw32+fullscreen#4e402439
8a44deba

[2]  http:/
/www.martyn.se/code/emacs/darkroom-mode/

[3]  http:
//www.emacswiki.org/cgi-bin/wiki/WriteRoom

[4]  http://dse.live
journal.com/66834.html





Re: Full screen mode on windows
user name
2008-06-03 02:01:41
Hi,
 I have the following key mapping and it just works fine on
M$. You
can add tests to check if tool bar is enabled and remove it,
restore
it later by storing keeping track (the way I restore -
max/restore).

(global-set-key [(control ?=)] '(lambda ()
				  (interactive)
				  (if (and (boundp '*frame-max) *frame-max)
				      (progn
					(setq *frame-max nil)
					(w32-send-sys-command 61728))
				    (progn
				      (setq *frame-max t)
				      (w32-send-sys-command 61488)))))


-dhruva

On Tue, Jun 3, 2008 at 12:23 PM, Evans Winner <thornetimbral.net> wrote:
> Ivan Kanis <expire-by-2008-06-07kanis.fr> writes:
>
>    AFAIK Emacs in the command prompt will not display
>    picture and bdf fonts, I use both extensively.  I
don't
>    think it has mouse support either which I use from
time
>    to time.
>
> I have wanted a feature like this for a long time for
W32.
> I started a brief gnu.emacs.help thread on the question
in
> March [1].  At home I use stumpwm which puts all
> applications in a true fullscreen mode that maximizes
> available screen area while still allowing the use of
GUI
> tools like the mouse and nice fonts, etc.  But at work
I am
> stuck with W32 and can't get that effect easily.
>
> Also, I suspect that a nice presentation package would
be
> fairly easy to write for Emacs and could be quite
useful,
> but it would be helpful for such a program to have
access by
> way of Emacs lisp to a true fullscreen toggle on all
> platforms.  The problem is that the W32 environment
does not
> seem to provide a high-level or easily accessed
function to
> do that.  An attempt seems to have been made that
requires
> python[2].
>
> There is also some interest in programs like Dark Room
or
> Writeroom which are text editors that are designed to
be
> visually minimalistic for the purpose of reducing
> distractions.  (There is a page on the EmacsWiki that
> describes some related hacks [3].)  Emacs is evolved
for use
> as a text editor for coding and some related things;
> features like a totally blank screen save text (no
title
> bars or tool bars, etc.) seem to be of interest more
to
> writers of fiction and poetry, and so forth.  A
related
> feature that would be nice for the ``Writeroom''
editing
> style, or for a presentation manager, is that of a
> disappearing mode-line, similar to the ``auto-hide''
> function available for the ``task-bar'' used in the
Windows
> GUI.  I know one attempt has been made to implement
this for
> Emacs[4], though it does not reclaim that space (or
> minibuffer space) for editing use, which would be
nice.
>
>
> Footnotes:
> [1] I don't know how to cite Usenet messages.
> The Google archive says it is:
> Message-ID:
<3112661d-c08e-412b-91f1-9e7ec192dc67s37g2000prg.googlegroups.com>
> A direct link to the Google web archived thread is:
> http://groups.google.c
om/group/gnu.emacs.help/browse_thread/thread/d97ba81a2428d37
e/4e4024398a44deba?lnk=st&q=emacsw32+fullscreen#4e402439
8a44deba
>
> [2]  http:/
/www.martyn.se/code/emacs/darkroom-mode/
>
> [3]  http:
//www.emacswiki.org/cgi-bin/wiki/WriteRoom
>
> [4]  http://dse.live
journal.com/66834.html
>
>
>
>
>



-- 
Contents reflect my personal views only!



Re: Full screen mode on windows
user name
2008-06-03 02:23:06
 EVANS WINNER <THORNETIMBRAL.NET>
 TUE, 03 JUN 2008 00:53:25 -0600

   EMACS IS EVOLVED FOR USE
   AS A TEXT EDITOR FOR CODING AND SOME RELATED THINGS;
   FEATURES LIKE A TOTALLY BLANK SCREEN SAVE TEXT (NO TITLE
   BARS OR TOOL BARS, ETC.) SEEM TO BE OF INTEREST MORE TO
   WRITERS OF FICTION AND POETRY, AND SO FORTH.

WHEN IN THE CODING MODE,
I NEED NO FIGHTING LIGHT:
KEYS UNHAMPERED STAMP
THOUGHTS, SO RITELY RIGHT.

STILL, MY KINDING MIND,
YEARS SINCE HOSING 'DOZE,
HOLDS THE DOPEFUL HOPE:
MAY DEBTLESS OWEING CLOSE.

THI



Re: Full screen mode on windows
country flaguser name
United States
2008-06-03 15:56:48
dhruva <dhruvakmgmail.com> writes:

    Hi, I have the following key mapping and it just works
     fine on M$. You can add tests to check if tool bar is
     enabled and remove it, restore it later by storing
     keeping track (the way I restore - max/restore).
 
    (global-set-key [(control ?=)] '(lambda ()
    				  (interactive)
    				  (if (and (boundp '*frame-max) *frame-max)
    				      (progn
    					(setq *frame-max nil)
    					(w32-send-sys-command 61728))
    				    (progn
    				      (setq *frame-max t)
    				      (w32-send-sys-command 61488)))))
 

This kind of thing has been suggested, but it does not
solve
the main problem (which is what the thread starter asked
about) of removing all window borders (particularly the
title bar) in the W32 environment.  I spent a couple of
hours at one point trying to find a code to use with the
'w32-send-sys-command function that would have that effect,
but to no avail.  It can be done, of course, by some means;
Internet Explorer 7 (as an example) responds to the Windows
standard F11 key the way that is being described (it even
has a nice feature that allows you to temporarily get out
of
the fullscreen mode by bumping the top of the screen with
the mouse pointer).





Re: Full screen mode on windows
country flaguser name
France
2008-06-04 12:57:06
joakimverona.se writes:

> I would suggest looking at the existing fullscreen
option for X:
>
>       (set-frame-parameter nil 'fullscreen  'fullboth)

Hello,

The following patch agains 22.2 makes it work. As a bonus I
have added
full width and full height so that it works properly. It's a
rough start
I need to work on startup options -fs -fh and -fw.

diff -U5 -pr emacs-22.2/src/frame.c emacs-ivan/src/frame.c
--- emacs-22.2/src/frame.c	2008-01-10 13:16:14.000000000
+0100
+++ emacs-ivan/src/frame.c	2008-06-04 19:47:38.000000000
+0200
 -2608,10
+2608,11  x_fullscreen_adjust (f, width, height, t
   int newheight = FRAME_LINES (f);
 
   *top_pos = f->top_pos;
   *left_pos = f->left_pos;
 
+#ifdef ivan
   if (f->want_fullscreen & FULLSCREEN_HEIGHT)
     {
       int ph;
 
       ph = FRAME_X_DISPLAY_INFO (f)->height;
 -2629,10
+2630,11  x_fullscreen_adjust (f, width, height, t
       newwidth = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pw);
       pw = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, newwidth) -
f->x_pixels_diff;
       newwidth = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pw);
       *left_pos = 0;
     }
+#endif
 
   *width = newwidth;
   *height = newheight;
 }
 
diff -U5 -pr emacs-22.2/src/w32fns.c
emacs-ivan/src/w32fns.c
--- emacs-22.2/src/w32fns.c	2008-03-01 20:28:20.000000000
+0100
+++ emacs-ivan/src/w32fns.c	2008-06-04 19:47:37.000000000
+0200
 -3664,10
+3664,14  w32_wnd_proc (hwnd, msg, wParam, lParam)
       wmsg.dwModifiers = w32_get_modifiers ();
       my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
       return 0;
 
     case WM_WINDOWPOSCHANGING:
+        /* Don't restrict fullscreen window */
+      f = x_window_to_frame (dpyinfo, hwnd);
+      if (f && f->want_fullscreen &
FULLSCREEN_BOTH)
+          goto dflt;
       /* Don't restrict the sizing of tip frames.  */
       if (hwnd == tip_window)
 	return 0;
       {
 	WINDOWPLACEMENT wp;
diff -U5 -pr emacs-22.2/src/w32term.c
emacs-ivan/src/w32term.c
--- emacs-22.2/src/w32term.c	2008-02-23 14:49:09.000000000
+0100
+++ emacs-ivan/src/w32term.c	2008-06-04 19:47:37.000000000
+0200
 -255,10
+255,11  static void w32_clip_to_row P_ ((struct 
 static BOOL my_show_window P_ ((struct frame *, HWND,
int));
 static void my_set_window_pos P_ ((HWND, HWND, int, int,
int, int, UINT));
 static void my_set_focus P_ ((struct frame *, HWND));
 static void my_set_foreground_window P_ ((HWND));
 static void my_destroy_window P_ ((struct frame *, HWND));
+static void w32_fullscreen_hook P_ ((struct frame *));
 
 static Lisp_Object Qvendor_specific_keysyms;
 
 
 /**********************************************************
*************
 -5559,10
+5560,71  x_set_offset (f, xoff, yoff, change_grav
 		     0, 0,
 		     SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
   UNBLOCK_INPUT;
 }
 
+static void
+w32_fullscreen_hook(f)
+          FRAME_PTR f;
+{
+    DWORD style;
+    RECT workarea_rect, window_rect;
+    HWND hwnd;
+
+    hwnd = FRAME_W32_WINDOW (f);
+
+    switch (f->want_fullscreen)
+        {
+        case FULLSCREEN_BOTH:
+            /* Remove the window furniture. */
+            my_show_window(f, hwnd, SW_MAXIMIZE);
+            style = GetWindowLongPtr(hwnd, GWL_STYLE);
+            style &= ~(WS_CAPTION | WS_BORDER |
WS_THICKFRAME);
+            SetWindowLongPtr(hwnd, GWL_STYLE, style);
+            /* Resize ourselves to exactly cover the
nearest monitor. */
+            GetClientRect(GetDesktopWindow(),
&workarea_rect);
+            SetWindowPos (hwnd,
+                          HWND_TOP,
+                          workarea_rect.left,
+                          workarea_rect.top,
+                          (workarea_rect.right -
workarea_rect.left),
+                          workarea_rect.bottom -
workarea_rect.top,
+                          SWP_FRAMECHANGED);
+            break;
+        case FULLSCREEN_WIDTH:
+            SystemParametersInfo( SPI_GETWORKAREA, 0,
&workarea_rect, 0 );
+            GetWindowRect(FRAME_W32_WINDOW(f),
&window_rect);
+            SetWindowPos(hwnd,
+                         NULL,
+                         workarea_rect.left,
+                         window_rect.top,
+                         workarea_rect.right,
+                         window_rect.bottom, 0);
+            break;
+        case FULLSCREEN_HEIGHT:
+            SystemParametersInfo( SPI_GETWORKAREA, 0,
&workarea_rect, 0 );
+            GetWindowRect(FRAME_W32_WINDOW(f),
&window_rect);
+            SetWindowPos(hwnd,
+                         NULL,
+                         window_rect.left,
+                         workarea_rect.top,
+                         window_rect.right,
+                         workarea_rect.bottom, 0);
+            break;
+        case FULLSCREEN_NONE:
+            /* Reinstate the window furniture. */
+            hwnd = FRAME_W32_WINDOW (f);
+            style = GetWindowLongPtr(hwnd, GWL_STYLE);
+            style |= WS_CAPTION | WS_BORDER |
WS_THICKFRAME;
+            SetWindowLongPtr(hwnd, GWL_STYLE, style);
+            my_show_window(f, hwnd, SW_RESTORE);
+            SetWindowPos(hwnd, NULL, 0, 0, 0, 0,
+                         SWP_NOMOVE | SWP_NOSIZE |
SWP_NOZORDER |
+                         SWP_FRAMECHANGED);
+            break;
+        }
+}
 
 /* Check if we need to resize the frame due to a fullscreen
request.
    If so needed, resize the frame. */
 static void
 x_check_fullscreen (f)
 -6502,10
+6564,11  w32_initialize ()
   frame_raise_lower_hook = w32_frame_raise_lower;
   set_vertical_scroll_bar_hook =
w32_set_vertical_scroll_bar;
   condemn_scroll_bars_hook = w32_condemn_scroll_bars;
   redeem_scroll_bar_hook = w32_redeem_scroll_bar;
   judge_scroll_bars_hook = w32_judge_scroll_bars;
+  fullscreen_hook = w32_fullscreen_hook;
 
   scroll_region_ok = 1;         /* we'll scroll partial
frames */
   char_ins_del_ok = 1;
   line_ins_del_ok = 1;          /* we'll just blt 'em */
   fast_clear_end_of_line = 1;   /* X does this well */




[1-18]

about | contact  Other archives ( Real Estate discussion Medical topics )