1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
# FVWM-Crystal: Fullscreen
# Written by: Maciej Delmanowski <harnir@linux.net.pl>
# Modifications: Thomas Adam <thomas@edulinux.homeunix.org>
# Overview:
# After using this function, current window will lose it's border and title
# and will be maximized to the full screen (wow). After using Fullscreen
# function on a "fullscreened" window it will return to it's previous size and
# position and border/title will be brought back.
# How to use:
# Bind "Fullscreen" command somewhere, example:
# Key Q A M Fullscreen
# Technical note:
# Fullscreen* functions are using 'State 0' as indicator if current window is
# in "fullscreened" mode.
# 'Fullscreen-Start' and 'Fullscreen-Stop' functions shouldn't be called
# directly, use 'Fullscreen' function instead.
# Bugs/Improvements:
# - Make a way to prevent "fullscreened" window to move or resize - when
# FixedSize or FixedPosition are put into WindowStyle command, window doesn't
# return to it's previous state.
#
# * Of course not -- that's dependant on the specific window. When you
# use "DestroyWindowStyle" you're clearing that. You'll just have to
# toggle it. -- ThomasAdam
#
# - terminal windows are not fully maximized, there is free space at the bottom
# and right edge of the screen. That's because terminal windows in FVWM can
# be resized usind character's width and height as the resolution. See Move
# and Resize commands description regarding "c" in FVWM manual.
#
# * See the 'ResizeHintOverride' style condition (below) -- ThomasAdam
DestroyFunc Fullscreen
AddToFunc Fullscreen
+ I ThisWindow (Maximized) Fullscreen-Stop
+ I TestRc (False) ThisWindow (!Maximized) Fullscreen-Start
DestroyFunc Fullscreen-Start
AddToFunc Fullscreen-Start
+ I WindowStyle !Title, !Borders, !Iconifiable, ResizeHintOverride
+ I UpdateStyles
+ I Maximize ewmhiwa 100 100
+ I WindowStyle !Maximizable, FixedSize, FixedPosition
+ I UpdateStyles
DestroyFunc Fullscreen-Stop
AddToFunc Fullscreen-Stop
+ I DestroyWindowStyle
++ I UpdateStyles
++ I ThisWindow (Maximized) Maximize
# vim:ft=fvwm
|