summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
232092f)
let the user specify if it is a 'final' move for a window or not, and the client will only be sent a ConfigureNotify if it is.
_type = (WindowType) -1;
unsigned long *val;
_type = (WindowType) -1;
unsigned long *val;
- unsigned long num = (unsigned) -1;
if (otk::Property::get(_window, otk::Property::atoms.net_wm_window_type,
otk::Property::atoms.atom, &num, &val)) {
// use the first value that we know about in the array
if (otk::Property::get(_window, otk::Property::atoms.net_wm_window_type,
otk::Property::atoms.atom, &num, &val)) {
// use the first value that we know about in the array
_iconic = _skip_taskbar = _skip_pager = false;
unsigned long *state;
_iconic = _skip_taskbar = _skip_pager = false;
unsigned long *state;
- unsigned long num = (unsigned) -1;
if (otk::Property::get(_window, otk::Property::atoms.net_wm_state,
otk::Property::atoms.atom, &num, &state)) {
if (otk::Property::get(_window, otk::Property::atoms.net_wm_state,
otk::Property::atoms.atom, &num, &state)) {
void Client::updateIcons()
{
void Client::updateIcons()
{
- unsigned long num = (unsigned) -1;
unsigned long *data;
unsigned long w, h, i = 0;
unsigned long *data;
unsigned long w, h, i = 0;
Pixmap *data;
if (otk::Property::get(_window, otk::Property::atoms.kwm_win_icon,
otk::Property::atoms.kwm_win_icon, &num, &data)) {
Pixmap *data;
if (otk::Property::get(_window, otk::Property::atoms.kwm_win_icon,
otk::Property::atoms.kwm_win_icon, &num, &data)) {
_pixmap_icon = data[0];
_pixmap_icon_mask = data[1];
}
_pixmap_icon = data[0];
_pixmap_icon_mask = data[1];
}
-void Client::move(int x, int y)
+void Client::move(int x, int y, bool final)
{
if (!(_functions & Func_Move)) return;
frame->frameGravity(x, y); // get the client's position based on x,y for the
// frame
{
if (!(_functions & Func_Move)) return;
frame->frameGravity(x, y); // get the client's position based on x,y for the
// frame
+ internal_move(x, y, final);
-void Client::internal_move(int x, int y)
+void Client::internal_move(int x, int y, bool final)
{
_area = otk::Rect(otk::Point(x, y), _area.size());
{
_area = otk::Rect(otk::Point(x, y), _area.size());
// send synthetic configure notify (we don't need to if we aren't mapped
// yet)
// send synthetic configure notify (we don't need to if we aren't mapped
// yet)
- XEvent event;
- event.type = ConfigureNotify;
- event.xconfigure.display = **otk::display;
- event.xconfigure.event = _window;
- event.xconfigure.window = _window;
+ if (final) {
+ XEvent event;
+ event.type = ConfigureNotify;
+ event.xconfigure.display = **otk::display;
+ event.xconfigure.event = _window;
+ event.xconfigure.window = _window;
- // root window coords with border in mind
- event.xconfigure.x = x - _border_width + frame->size().left;
- event.xconfigure.y = y - _border_width + frame->size().top;
+ // root window coords with border in mind
+ event.xconfigure.x = x - _border_width + frame->size().left;
+ event.xconfigure.y = y - _border_width + frame->size().top;
- event.xconfigure.width = _area.width();
- event.xconfigure.height = _area.height();
- event.xconfigure.border_width = _border_width;
- event.xconfigure.above = frame->plate();
- event.xconfigure.override_redirect = False;
- XSendEvent(event.xconfigure.display, event.xconfigure.window, False,
- StructureNotifyMask, &event);
+ event.xconfigure.width = _area.width();
+ event.xconfigure.height = _area.height();
+ event.xconfigure.border_width = _border_width;
+ event.xconfigure.above = frame->plate();
+ event.xconfigure.override_redirect = False;
+ XSendEvent(event.xconfigure.display, event.xconfigure.window, False,
+ StructureNotifyMask, &event);
- printf("Sent synthetic ConfigureNotify %d,%d %d,%d to 0x%lx\n",
- event.xconfigure.x, event.xconfigure.y, event.xconfigure.width,
- event.xconfigure.height, event.xconfigure.window);
+ printf("Sent synthetic ConfigureNotify %d,%d %d,%d to 0x%lx\n",
+ event.xconfigure.x, event.xconfigure.y, event.xconfigure.width,
+ event.xconfigure.height, event.xconfigure.window);
if (otk::Property::get(_window, otk::Property::atoms.openbox_premax,
otk::Property::atoms.cardinal, &n,
(long unsigned**) &readdim)) {
if (otk::Property::get(_window, otk::Property::atoms.openbox_premax,
otk::Property::atoms.cardinal, &n,
(long unsigned**) &readdim)) {
if (_max_horz) {
dimensions[0] = readdim[0];
dimensions[2] = readdim[2];
if (_max_horz) {
dimensions[0] = readdim[0];
dimensions[2] = readdim[2];
if (otk::Property::get(_window, otk::Property::atoms.openbox_premax,
otk::Property::atoms.cardinal, &n,
(long unsigned**) &dimensions)) {
if (otk::Property::get(_window, otk::Property::atoms.openbox_premax,
otk::Property::atoms.cardinal, &n,
(long unsigned**) &dimensions)) {
if (dir == 0 || dir == 1) { // horz
x = (signed int)dimensions[0];
w = (signed int)dimensions[2];
if (dir == 0 || dir == 1) { // horz
x = (signed int)dimensions[0];
w = (signed int)dimensions[2];
if (otk::Property::get(_window, otk::Property::atoms.openbox_premax,
otk::Property::atoms.cardinal, &n,
(long unsigned**) &dimensions)) {
if (otk::Property::get(_window, otk::Property::atoms.openbox_premax,
otk::Property::atoms.cardinal, &n,
(long unsigned**) &dimensions)) {
x = dimensions[0];
y = dimensions[1];
w = dimensions[2];
x = dimensions[0];
y = dimensions[1];
w = dimensions[2];
/*!
@param x The X coordinate to move to.
@param y The Y coordinate to move to.
/*!
@param x The X coordinate to move to.
@param y The Y coordinate to move to.
+ @param final true if this is the final move, false if there are more move
+ events coming. The client is not notified of the move when
+ final is false.
- void internal_move(int x, int y);
+ void internal_move(int x, int y, bool final = true);
//! Internal version of the Client::resize function
/*!
This also maintains things like the client's minsize, and size increments.
//! Internal version of the Client::resize function
/*!
This also maintains things like the client's minsize, and size increments.
the position specified.
@param x The X coordinate to move to.
@param y The Y coordinate to move to.
the position specified.
@param x The X coordinate to move to.
@param y The Y coordinate to move to.
+ @param final true if this is the final move, false if there are more move
+ events coming. The client is not notified of the move when
+ final is false.
- void move(int x, int y);
+ void move(int x, int y, bool final = true);
//! Resizes the client window, anchoring it in a given corner
/*!
//! Resizes the client window, anchoring it in a given corner
/*!