X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FXWorkArea.C;h=51f9a4e405b439b75818cbdeacb50ee1f926a4f8;hb=37e82a546392d43f787826b85481a11f2a27af15;hp=949e3ea8976fb03904a0c50e646d962a9a41d5b0;hpb=8a490234de3aa50e1935de00fe55d68838671e60;p=lyx.git diff --git a/src/frontends/xforms/XWorkArea.C b/src/frontends/xforms/XWorkArea.C index 949e3ea897..51f9a4e405 100644 --- a/src/frontends/xforms/XWorkArea.C +++ b/src/frontends/xforms/XWorkArea.C @@ -24,6 +24,8 @@ #include +using boost::shared_ptr; + using std::abs; using std::dec; using std::endl; @@ -147,17 +149,17 @@ XWorkArea::XWorkArea(LyXView & owner, int w, int h) // Hand control of the layout of these widgets to the // Layout Engine. XFormsView & xview = dynamic_cast(owner); - BoxList & boxlist = xview.getBox(XFormsView::Center).children(); + BoxList & boxlist = xview.getBox(XFormsView::Center)->children(); - wa_box_ = &boxlist.push_back(Box(0,0)); + wa_box_ = boxlist.push_back(Box(0,0)); wa_box_->set(Box::Horizontal); - Box & frame_box = widgets_.add(frame, wa_box_->children(), 0, 0); - frame_box.set(Box::Expand); + shared_ptr frame_box = widgets_.add(frame, wa_box_->children(), 0, 0); + frame_box->set(Box::Expand); int const bw = int(abs(fl_get_border_width())); - Box & wa_box = embed(work_area, frame_box.children(), widgets_, bw); - wa_box.set(Box::Expand); + shared_ptr wa_box = embed(work_area, frame_box->children(), widgets_, bw); + wa_box->set(Box::Expand); widgets_.add(scrollbar, wa_box_->children(), 17, 0); @@ -293,6 +295,9 @@ int XWorkArea::work_area_handler(FL_OBJECT * ob, int event, FL_Coord, FL_Coord, int key, void * xev) { + if (event != 11) + lyxerr[Debug::WORKAREA] << "Workarea event: EVENT: " << event << endl; + XEvent * ev = static_cast(xev); XWorkArea * area = static_cast(ob->u_vdata); @@ -385,6 +390,8 @@ int XWorkArea::work_area_handler(FL_OBJECT * ob, int event, break; case FL_DRAG: { + lyxerr[Debug::WORKAREA] << "Workarea event: DRAG 0" << endl; + if (!ev || !area->scrollbar) break;