if(video_on) get_canvas()->start_video();
+ get_canvas()->lock_window("Canvas::create_canvas 2");
+ get_canvas()->focus();
+ get_canvas()->unlock_window();
+
unlock_canvas();
}
-
-
-
-
-
-
-
-
-
-
-CanvasFullScreen::CanvasFullScreen(Canvas *canvas,
- int w,
- int h)
- : BC_FullScreen(canvas->subwindow,
- w,
- h,
- BLACK,
- 0,
- 0,
- 0)
+CanvasFullScreen::CanvasFullScreen(Canvas *canvas, int w, int h)
+ : BC_FullScreen(canvas->subwindow, w, h, BLACK, 0, 0, 0)
{
this->canvas = canvas;
}
}
-
-
-
-
-
-
-
-
-
-
-
-CanvasXScroll::CanvasXScroll(EDL *edl,
- Canvas *canvas,
- int x,
- int y,
- int length,
- int position,
- int handle_length,
- int pixels)
- : BC_ScrollBar(x,
- y,
- SCROLL_HORIZ,
- pixels,
- length,
- position,
- handle_length)
+CanvasXScroll::CanvasXScroll(EDL *edl, Canvas *canvas, int x, int y,
+ int length, int position, int handle_length, int pixels)
+ : BC_ScrollBar(x, y, SCROLL_HORIZ, pixels, length, position, handle_length)
{
this->canvas = canvas;
}
}
-
-
-
-
-CanvasYScroll::CanvasYScroll(EDL *edl,
- Canvas *canvas,
- int x,
- int y,
- int length,
- int position,
- int handle_length,
- int pixels)
- : BC_ScrollBar(x,
- y,
- SCROLL_VERT,
- pixels,
- length,
- position,
- handle_length)
+CanvasYScroll::CanvasYScroll(EDL *edl, Canvas *canvas, int x, int y,
+ int length, int position, int handle_length, int pixels)
+ : BC_ScrollBar(x, y, SCROLL_VERT, pixels, length, position, handle_length)
{
this->canvas = canvas;
}
}
-
-
-
-
CanvasFullScreenPopup::CanvasFullScreenPopup(Canvas *canvas)
: BC_PopupMenu(0, 0, 0, "", 0)
{
}
-
-
-
-
-
-
CanvasPopup::CanvasPopup(Canvas *canvas)
: BC_PopupMenu(0, 0, 0, "", 0)
{
{
last_center_x = gui->affected_x->get_value();
last_center_y = gui->affected_y->get_value();
- float x = gui->center_x + cursor_x - gui->x_origin;
- float y = gui->center_y + cursor_y - gui->y_origin;
+ float dx = cursor_x - gui->x_origin;
+ float dy = cursor_y - gui->y_origin;
+ if(gui->current_operation == CWINDOW_CAMERA ) {
+ dx = -dx; dy = -dy;
+ }
+ float x = gui->center_x + dx;
+ float y = gui->center_y + dy;
gui->affected_x->set_value(x);
gui->affected_y->set_value(y);
if( !EQUIV(last_center_x, x) || !EQUIV(last_center_y, y) )
cursor_entered = 1;
}
if( cursor_entered )
- XSetInputFocus(display, win, RevertToParent, CurrentTime);
+ focus();
}
event_win = event->xany.window;
cursor_x = event->xcrossing.x;
set_opaque();
}
+void BC_WindowBase::focus()
+{
+ XSetInputFocus(top_level->display, top_level->win, RevertToParent, CurrentTime);
+}
+