mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Remove bug fixes for xforms < 1.0.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6587 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0c98b80906
commit
5065161f37
@ -1,3 +1,10 @@
|
|||||||
|
2003-03-26 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
|
* combox.C (show):
|
||||||
|
* FormBase.C (hide, PrehandlerCB):
|
||||||
|
* FormDialogView.C (hide, PrehandlerCB):
|
||||||
|
remove support for xforms < 1.0.
|
||||||
|
|
||||||
2003-03-26 Angus Leeming <leeming@lyx.org>
|
2003-03-26 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* Dialogs.C:
|
* Dialogs.C:
|
||||||
|
@ -169,12 +169,6 @@ void FormBase::show()
|
|||||||
|
|
||||||
void FormBase::hide()
|
void FormBase::hide()
|
||||||
{
|
{
|
||||||
#if FL_VERSION < 1
|
|
||||||
// Does no harm if none is visible and ensures that the tooltip form
|
|
||||||
// is hidden should the dialog be closed from the keyboard.
|
|
||||||
fl_hide_tooltip();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// xforms sometimes tries to process a hint-type MotionNotify, and
|
// xforms sometimes tries to process a hint-type MotionNotify, and
|
||||||
// use XQueryPointer, without verifying if the window still exists.
|
// use XQueryPointer, without verifying if the window still exists.
|
||||||
// So we try to clear out motion events in the queue before the
|
// So we try to clear out motion events in the queue before the
|
||||||
@ -258,54 +252,35 @@ void FormBase::PrehandlerCB(FL_OBJECT * ob, int event, int key)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event) {
|
if (message_widget_) {
|
||||||
case FL_ENTER:
|
switch (event) {
|
||||||
case FL_LEAVE:
|
case FL_ENTER:
|
||||||
if (message_widget_) {
|
case FL_LEAVE:
|
||||||
// Post feedback as the mouse enters the object,
|
// Post feedback as the mouse enters the object,
|
||||||
// remove it as the mouse leaves.
|
// remove it as the mouse leaves.
|
||||||
MessageCB(ob, event);
|
MessageCB(ob, event);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FL_VERSION < 1
|
|
||||||
if (ob->objclass == FL_TABFOLDER) {
|
|
||||||
// This prehandler is used to work-around an xforms
|
|
||||||
// bug and ensures that the form->x, form->y coords of
|
|
||||||
// the active tabfolder are up to date.
|
|
||||||
|
|
||||||
// The tabfolder itself can be very narrow, being just
|
|
||||||
// the visible border to the tabs.
|
|
||||||
// We thus use both FL_ENTER and FL_LEAVE as flags,
|
|
||||||
// in case the FL_ENTER event is not caught.
|
|
||||||
|
|
||||||
FL_FORM * const folder = fl_get_active_folder(ob);
|
|
||||||
if (folder && folder->window) {
|
|
||||||
fl_get_winorigin(folder->window,
|
|
||||||
&(folder->x), &(folder->y));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tooltips are not displayed on browser widgets due to an xforms' bug.
|
// Tooltips are not displayed on browser widgets due to an xforms' bug.
|
||||||
// I have a fix, but it's not yet in the xforms sources.
|
// I have a fix, but it's not yet in the xforms sources.
|
||||||
// This is a work-around:
|
// This is a work-around:
|
||||||
switch (event) {
|
if (ob->objclass == FL_BROWSER) {
|
||||||
case FL_ENTER:
|
switch (event) {
|
||||||
if (ob->objclass == FL_BROWSER &&
|
case FL_ENTER:
|
||||||
ob->tooltip && *(ob->tooltip)) {
|
if (ob->tooltip && *(ob->tooltip)) {
|
||||||
int const x = ob->form->x + ob->x;
|
int const x = ob->form->x + ob->x;
|
||||||
int const y = ob->form->y + ob->y + ob->h + 1;
|
int const y = ob->form->y + ob->y + ob->h + 1;
|
||||||
fl_show_tooltip(ob->tooltip, x, y);
|
fl_show_tooltip(ob->tooltip, x, y);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FL_LEAVE:
|
case FL_LEAVE:
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
case FL_KEYPRESS:
|
case FL_KEYPRESS:
|
||||||
if (ob->objclass == FL_BROWSER)
|
|
||||||
fl_hide_tooltip();
|
fl_hide_tooltip();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,12 +171,6 @@ void FormDialogView::show()
|
|||||||
|
|
||||||
void FormDialogView::hide()
|
void FormDialogView::hide()
|
||||||
{
|
{
|
||||||
#if FL_VERSION < 1
|
|
||||||
// Does no harm if none is visible and ensures that the tooltip form
|
|
||||||
// is hidden should the dialog be closed from the keyboard.
|
|
||||||
fl_hide_tooltip();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// xforms sometimes tries to process a hint-type MotionNotify, and
|
// xforms sometimes tries to process a hint-type MotionNotify, and
|
||||||
// use XQueryPointer, without verifying if the window still exists.
|
// use XQueryPointer, without verifying if the window still exists.
|
||||||
// So we try to clear out motion events in the queue before the
|
// So we try to clear out motion events in the queue before the
|
||||||
@ -260,54 +254,35 @@ void FormDialogView::PrehandlerCB(FL_OBJECT * ob, int event, int key)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event) {
|
if (message_widget_) {
|
||||||
case FL_ENTER:
|
switch (event) {
|
||||||
case FL_LEAVE:
|
case FL_ENTER:
|
||||||
if (message_widget_) {
|
case FL_LEAVE:
|
||||||
// Post feedback as the mouse enters the object,
|
// Post feedback as the mouse enters the object,
|
||||||
// remove it as the mouse leaves.
|
// remove it as the mouse leaves.
|
||||||
MessageCB(ob, event);
|
MessageCB(ob, event);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FL_VERSION < 1
|
|
||||||
if (ob->objclass == FL_TABFOLDER) {
|
|
||||||
// This prehandler is used to work-around an xforms
|
|
||||||
// bug and ensures that the form->x, form->y coords of
|
|
||||||
// the active tabfolder are up to date.
|
|
||||||
|
|
||||||
// The tabfolder itself can be very narrow, being just
|
|
||||||
// the visible border to the tabs.
|
|
||||||
// We thus use both FL_ENTER and FL_LEAVE as flags,
|
|
||||||
// in case the FL_ENTER event is not caught.
|
|
||||||
|
|
||||||
FL_FORM * const folder = fl_get_active_folder(ob);
|
|
||||||
if (folder && folder->window) {
|
|
||||||
fl_get_winorigin(folder->window,
|
|
||||||
&(folder->x), &(folder->y));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tooltips are not displayed on browser widgets due to an xforms' bug.
|
// Tooltips are not displayed on browser widgets due to an xforms' bug.
|
||||||
// I have a fix, but it's not yet in the xforms sources.
|
// I have a fix, but it's not yet in the xforms sources.
|
||||||
// This is a work-around:
|
// This is a work-around:
|
||||||
switch (event) {
|
if (ob->objclass == FL_BROWSER) {
|
||||||
case FL_ENTER:
|
switch (event) {
|
||||||
if (ob->objclass == FL_BROWSER &&
|
case FL_ENTER:
|
||||||
ob->tooltip && *(ob->tooltip)) {
|
if (ob->tooltip && *(ob->tooltip)) {
|
||||||
int const x = ob->form->x + ob->x;
|
int const x = ob->form->x + ob->x;
|
||||||
int const y = ob->form->y + ob->y + ob->h + 1;
|
int const y = ob->form->y + ob->y + ob->h + 1;
|
||||||
fl_show_tooltip(ob->tooltip, x, y);
|
fl_show_tooltip(ob->tooltip, x, y);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FL_LEAVE:
|
case FL_LEAVE:
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
case FL_KEYPRESS:
|
case FL_KEYPRESS:
|
||||||
if (ob->objclass == FL_BROWSER)
|
|
||||||
fl_hide_tooltip();
|
fl_hide_tooltip();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,19 +279,6 @@ void Combox::show()
|
|||||||
fl_redraw_object(button);
|
fl_redraw_object(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FL_VERSION < 1
|
|
||||||
// This fix ensures that, even if label lies on a tabfolder,
|
|
||||||
// the x,y coords of the underlying form are up to date.
|
|
||||||
// It should be rendered redundant by a similar fix in the
|
|
||||||
// tabfolder prehandler, but apparently "enter" events are not always
|
|
||||||
// caught...
|
|
||||||
// Angus 4 Oct, 2002.
|
|
||||||
if (label->form->window) {
|
|
||||||
FL_FORM * lf = label->form;
|
|
||||||
fl_get_winorigin(lf->window, &(lf->x), &(lf->y));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int const x = label->form->x + label->x;
|
int const x = label->form->x + label->x;
|
||||||
int const y = label->form->y + label->y + label->h;
|
int const y = label->form->y + label->y + label->h;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user