projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add BC_SCALE env var for hi def monitors, cleanup theme data
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
guicast
/
bcwindowbase.C
diff --git
a/cinelerra-5.1/guicast/bcwindowbase.C
b/cinelerra-5.1/guicast/bcwindowbase.C
index 93b3d4554077c45aeb721636fe574ed77a09a73a..ad25943b3ae97e540d83c0dc06e33248d46f37e4 100644
(file)
--- a/
cinelerra-5.1/guicast/bcwindowbase.C
+++ b/
cinelerra-5.1/guicast/bcwindowbase.C
@@
-69,17
+69,8
@@
BC_ResizeCall::BC_ResizeCall(int w, int h)
}
}
-
-
-
-
-
int BC_WindowBase::shm_completion_event = -1;
int BC_WindowBase::shm_completion_event = -1;
-
-
-
BC_Resources BC_WindowBase::resources;
BC_Resources BC_WindowBase::resources;
-
Window XGroupLeader = 0;
Mutex BC_KeyboardHandlerLock::keyboard_listener_mutex("keyboard_listener",0);
Window XGroupLeader = 0;
Mutex BC_KeyboardHandlerLock::keyboard_listener_mutex("keyboard_listener",0);
@@
-2092,15
+2083,8
@@
int BC_WindowBase::init_colors()
char *data = 0;
XImage *ximage;
ximage = XCreateImage(top_level->display,
char *data = 0;
XImage *ximage;
ximage = XCreateImage(top_level->display,
- top_level->vis,
- top_level->default_depth,
- ZPixmap,
- 0,
- data,
- 16,
- 16,
- 8,
- 0);
+ top_level->vis, top_level->default_depth,
+ ZPixmap, 0, data, 16, 16, 8, 0);
bits_per_pixel = ximage->bits_per_pixel;
XDestroyImage(ximage);
bits_per_pixel = ximage->bits_per_pixel;
XDestroyImage(ximage);
@@
-3880,13
+3864,13
@@
int BC_WindowBase::get_abs_cursor_y(int lock_window)
void BC_WindowBase::get_pop_cursor(int &px, int &py, int lock_window)
{
void BC_WindowBase::get_pop_cursor(int &px, int &py, int lock_window)
{
- int
margin = 100
;
+ int
xmargin = xS(100), ymargin = yS(100)
;
get_abs_cursor(px, py, lock_window);
get_abs_cursor(px, py, lock_window);
- if( px <
margin ) px =
margin;
- if( py <
margin ) py =
margin;
- int wd = get_screen_w(lock_window,-1) - margin;
+ if( px <
xmargin ) px = x
margin;
+ if( py <
ymargin ) py = y
margin;
+ int wd = get_screen_w(lock_window,-1) -
x
margin;
if( px > wd ) px = wd;
if( px > wd ) px = wd;
- int ht = get_screen_h(lock_window,-1) - margin;
+ int ht = get_screen_h(lock_window,-1) -
y
margin;
if( py > ht ) py = ht;
}
int BC_WindowBase::get_pop_cursor_x(int lock_window)
if( py > ht ) py = ht;
}
int BC_WindowBase::get_pop_cursor_x(int lock_window)
@@
-4147,21
+4131,15
@@
int BC_WindowBase::reposition_window(int x, int y, int w, int h)
{
// KDE shifts window right and down.
// FVWM leaves window alone and adds border around it.
{
// KDE shifts window right and down.
// FVWM leaves window alone and adds border around it.
- XMoveResizeWindow(top_level->display,
- win,
+ XMoveResizeWindow(top_level->display, win,
x - BC_DisplayInfo::auto_reposition_x,
y - BC_DisplayInfo::auto_reposition_y,
x - BC_DisplayInfo::auto_reposition_x,
y - BC_DisplayInfo::auto_reposition_y,
- this->w,
- this->h);
+ this->w, this->h);
}
else
{
}
else
{
- XMoveResizeWindow(top_level->display,
- win,
- x,
- y,
- this->w,
- this->h);
+ XMoveResizeWindow(top_level->display, win, x, y,
+ this->w, this->h);
}
if(resize)
}
if(resize)
@@
-4381,12
+4359,8
@@
int BC_WindowBase::save_defaults(BC_Hash *defaults)
// For some reason XTranslateCoordinates can take a long time to return.
// We work around this by only calling it when the event windows are different.
// For some reason XTranslateCoordinates can take a long time to return.
// We work around this by only calling it when the event windows are different.
-void BC_WindowBase::translate_coordinates(Window src_w,
- Window dest_w,
- int src_x,
- int src_y,
- int *dest_x_return,
- int *dest_y_return)
+void BC_WindowBase::translate_coordinates(Window src_w, Window dest_w,
+ int src_x, int src_y, int *dest_x_return, int *dest_y_return)
{
Window tempwin = 0;
//Timer timer;
{
Window tempwin = 0;
//Timer timer;
@@
-4398,14
+4372,8
@@
void BC_WindowBase::translate_coordinates(Window src_w,
}
else
{
}
else
{
- XTranslateCoordinates(top_level->display,
- src_w,
- dest_w,
- src_x,
- src_y,
- dest_x_return,
- dest_y_return,
- &tempwin);
+ XTranslateCoordinates(top_level->display, src_w, dest_w,
+ src_x, src_y, dest_x_return, dest_y_return, &tempwin);
//printf("BC_WindowBase::translate_coordinates 1 %lld\n", timer.get_difference());
}
}
//printf("BC_WindowBase::translate_coordinates 1 %lld\n", timer.get_difference());
}
}
@@
-4421,10
+4389,6
@@
void BC_WindowBase::get_win_coordinates(int abs_x, int abs_y, int *x, int *y)
}
}
-
-
-
-
#ifdef HAVE_LIBXXF86VM
void BC_WindowBase::closest_vm(int *vm, int *width, int *height)
{
#ifdef HAVE_LIBXXF86VM
void BC_WindowBase::closest_vm(int *vm, int *width, int *height)
{