Tue Oct 5 14:23:51 PDT 1999
(Raster) add dialogs to warn about zoom mode etc...... SVN revision: 667
This commit is contained in:
parent
c62b3c778d
commit
d62b92b29d
|
@ -3065,3 +3065,10 @@ Tue Oct 5 12:06:49 PDT 1999
|
|||
|
||||
__WINDOWS_KEY was the wrang meta modifier - chnage the definitions define...
|
||||
add a windowskey+left mosue and ctrl+left mouse optison to briugn up menus
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Tue Oct 5 14:23:51 PDT 1999
|
||||
(Raster)
|
||||
|
||||
add dialogs to warn about zoom mode etc......
|
||||
|
|
|
@ -3641,12 +3641,39 @@ int
|
|||
doZoom(void *params)
|
||||
{
|
||||
EWin *ewin;
|
||||
char s[1024];
|
||||
|
||||
EDBUG(6, "doZoom");
|
||||
|
||||
if (!(CanZoom()))
|
||||
EDBUG_RETURN(0);
|
||||
|
||||
Esnprintf(s, sizeof(s), "%s/.zoom_warn", UserEDir());
|
||||
if (!exists(s))
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
f = fopen(s, "w");
|
||||
if (f)
|
||||
{
|
||||
fprintf(f, "You have been warned abotu the dangers of Zoom mode\n");
|
||||
fclose(f);
|
||||
}
|
||||
DIALOG_OK("Warning !!!",
|
||||
"This feature is heavily reliant on a feature of your\n"
|
||||
"X Server called the Vid Mode Extension. This feature exists\n"
|
||||
"in XFree86 Servers, but is not a heavily used part of the\n"
|
||||
"Server and thus isn't tested much.\n"
|
||||
"\n"
|
||||
"It is possible your X Server does not deal well with being\n"
|
||||
"asked to switch modes quickly and it may hang, glitch,\n"
|
||||
"display artifacts or perhaps simply refuse to work.\n"
|
||||
"\n"
|
||||
"This is a warning and will only be displayed this one time.\n"
|
||||
"If your Server does not behave well then you will probably\n"
|
||||
"have to avoid using this feature.\n");
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
ewin = GetFocusEwin();
|
||||
|
||||
if (!ewin)
|
||||
|
|
|
@ -1025,6 +1025,11 @@ Config_Menu(FILE * ConfigFile)
|
|||
else
|
||||
ok = 0;
|
||||
}
|
||||
else if (act == ACTION_ZOOM)
|
||||
{
|
||||
if (!CanZoom())
|
||||
ok = 0;
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
params = atword(s, 3);
|
||||
|
|
34
src/focus.c
34
src/focus.c
|
@ -25,37 +25,6 @@
|
|||
static void ReverseTimeout(int val, void *data);
|
||||
static void AutoraiseTimeout(int val, void *data);
|
||||
|
||||
/* static void FixUpBadFocus(int val, void *data);
|
||||
*
|
||||
* This function seems un-necessary now -- Mandrake
|
||||
*
|
||||
* static void
|
||||
* FixUpBadFocus(int val, void *data)
|
||||
* {
|
||||
* EWin *ewin;
|
||||
* Window win;
|
||||
* int revert;
|
||||
*
|
||||
* return;
|
||||
* if (mode.focusmode == FOCUS_CLICK)
|
||||
* return;
|
||||
* XGetInputFocus(disp, &win, &revert);
|
||||
* ewin = FindItem("", win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
|
||||
* if (ewin)
|
||||
* {
|
||||
* if (win != ewin->client.win)
|
||||
* {
|
||||
* FocusToEWin(ewin);
|
||||
* if (mode.kde_support)
|
||||
* KDE_UpdateFocusedWindow();
|
||||
* }
|
||||
* }
|
||||
* return;
|
||||
* val = 0;
|
||||
* data = NULL;
|
||||
* }
|
||||
*/
|
||||
|
||||
/* Mostly stolen from the temporary 'ToolTipTimeout' */
|
||||
static void
|
||||
AutoraiseTimeout(int val, void *data)
|
||||
|
@ -323,7 +292,6 @@ FocusToEWin(EWin * ewin)
|
|||
ButtonPressMask,
|
||||
GrabModeSync, GrabModeAsync, None, None);
|
||||
}
|
||||
/* DoIn("FIXUP_FOCUS", 0.25, FixUpBadFocus, 0, NULL); */
|
||||
if (!ewin)
|
||||
{
|
||||
XSetInputFocus(disp, root.win, RevertToPointerRoot, CurrentTime);
|
||||
|
@ -357,7 +325,7 @@ FocusToEWin(EWin * ewin)
|
|||
AUDIO_PLAY("SOUND_FOCUS_SET");
|
||||
ICCCM_Focus(mode.focuswin);
|
||||
}
|
||||
ReZoom(mode.focuswin);
|
||||
/* ReZoom(mode.focuswin); */
|
||||
if ((mode.autoraise) && (mode.focuswin) && (!mode.focuswin->menu) &&
|
||||
(mode.focusmode != FOCUS_CLICK))
|
||||
DoIn("AUTORAISE_TIMEOUT", mode.autoraisetime, AutoraiseTimeout,
|
||||
|
|
|
@ -145,7 +145,7 @@ GetZoomEWin(void)
|
|||
void
|
||||
ReZoom(EWin * ewin)
|
||||
{
|
||||
if (InZoom())
|
||||
if ((InZoom()) && (ewin != zoom_last_ewin))
|
||||
{
|
||||
Zoom(NULL);
|
||||
Zoom(ewin);
|
||||
|
@ -172,7 +172,8 @@ ZoomInit(void)
|
|||
if (XHasDGA())
|
||||
{
|
||||
FillStdVidModes();
|
||||
zoom_can = 1;
|
||||
if (std_vid_modes_num > 1)
|
||||
zoom_can = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,7 +186,7 @@ Zoom(EWin * ewin)
|
|||
{
|
||||
if (zoom_last_ewin)
|
||||
{
|
||||
XUngrabPointer(disp, CurrentTime);
|
||||
/* XUngrabPointer(disp, CurrentTime); */
|
||||
MoveEwin(zoom_last_ewin, zoom_last_x, zoom_last_y);
|
||||
ICCCM_Configure(zoom_last_ewin);
|
||||
XDestroyWindow(disp, zoom_mask_1);
|
||||
|
@ -205,6 +206,7 @@ Zoom(EWin * ewin)
|
|||
MoveEwin(ewin, -ewin->border->border.left,
|
||||
-ewin->border->border.top);
|
||||
ICCCM_Configure(ewin);
|
||||
FocusToEWin(ewin);
|
||||
/* XGrabPointer(disp, ewin->client.win, False, 0,
|
||||
* ButtonPressMask | ButtonReleaseMask |
|
||||
* PointerMotionMask | ButtonMotionMask |
|
||||
|
|
Loading…
Reference in New Issue