X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=be8230c02256a608ee1d7eb71daa5cf0cb0c1d5a;hb=5960d27b1c35c58d3c1731c71c44b9c61328a34d;hp=b0666b27d8e0fb28d8472bd688b1bbf94bb5f02e;hpb=d122c973ca78cd4ac4e17931269f31b0abfffbb0;p=chaz%2Fopenbox diff --git a/openbox/frame.c b/openbox/frame.c index b0666b27..be8230c0 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -20,17 +20,16 @@ #include "frame.h" #include "client.h" #include "openbox.h" -#include "extensions.h" #include "prop.h" #include "grab.h" #include "config.h" #include "framerender.h" -#include "mainloop.h" #include "focus_cycle.h" #include "focus_cycle_indicator.h" #include "moveresize.h" #include "screen.h" #include "render/theme.h" +#include "obt/display.h" #define FRAME_EVENTMASK (EnterWindowMask | LeaveWindowMask | \ ButtonPressMask | ButtonReleaseMask | \ @@ -1007,6 +1006,10 @@ void frame_grab_client(ObFrame *self) g_hash_table_insert(window_map, &self->innertop, self->client); g_hash_table_insert(window_map, &self->innerright, self->client); g_hash_table_insert(window_map, &self->innerbottom, self->client); + g_hash_table_insert(window_map, &self->innerblb, self->client); + g_hash_table_insert(window_map, &self->innerbll, self->client); + g_hash_table_insert(window_map, &self->innerbrb, self->client); + g_hash_table_insert(window_map, &self->innerbrr, self->client); g_hash_table_insert(window_map, &self->title, self->client); g_hash_table_insert(window_map, &self->label, self->client); g_hash_table_insert(window_map, &self->max, self->client); @@ -1049,8 +1052,8 @@ void frame_release_client(ObFrame *self) gboolean reparent = TRUE; /* if there was any animation going on, kill it */ - ob_main_loop_timeout_remove_data(ob_main_loop, frame_animate_iconify, - self, FALSE); + obt_main_loop_timeout_remove_data(ob_main_loop, frame_animate_iconify, + self, FALSE); /* check if the app has already reparented its window away */ while (XCheckTypedWindowEvent(ob_display, self->client->window, @@ -1087,6 +1090,10 @@ void frame_release_client(ObFrame *self) g_hash_table_remove(window_map, &self->innertop); g_hash_table_remove(window_map, &self->innerright); g_hash_table_remove(window_map, &self->innerbottom); + g_hash_table_remove(window_map, &self->innerblb); + g_hash_table_remove(window_map, &self->innerbll); + g_hash_table_remove(window_map, &self->innerbrb); + g_hash_table_remove(window_map, &self->innerbrr); g_hash_table_remove(window_map, &self->title); g_hash_table_remove(window_map, &self->label); g_hash_table_remove(window_map, &self->max); @@ -1122,7 +1129,7 @@ void frame_release_client(ObFrame *self) g_hash_table_remove(window_map, &self->rgriptop); g_hash_table_remove(window_map, &self->rgripbottom); - ob_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self, TRUE); + obt_main_loop_timeout_remove_data(ob_main_loop, flash_timeout, self, TRUE); } /* is there anything present between us and the label? */ @@ -1459,6 +1466,10 @@ ObFrameContext frame_context(ObClient *client, Window win, gint x, gint y) if (win == self->innerleft) return OB_FRAME_CONTEXT_LEFT; if (win == self->innerbottom) return OB_FRAME_CONTEXT_BOTTOM; if (win == self->innerright) return OB_FRAME_CONTEXT_RIGHT; + if (win == self->innerbll) return OB_FRAME_CONTEXT_BLCORNER; + if (win == self->innerblb) return OB_FRAME_CONTEXT_BLCORNER; + if (win == self->innerbrr) return OB_FRAME_CONTEXT_BRCORNER; + if (win == self->innerbrb) return OB_FRAME_CONTEXT_BRCORNER; if (win == self->max) return OB_FRAME_CONTEXT_MAXIMIZE; if (win == self->iconify) return OB_FRAME_CONTEXT_ICONIFY; if (win == self->close) return OB_FRAME_CONTEXT_CLOSE; @@ -1639,12 +1650,12 @@ void frame_flash_start(ObFrame *self) self->flash_on = self->focused; if (!self->flashing) - ob_main_loop_timeout_add(ob_main_loop, - G_USEC_PER_SEC * 0.6, - flash_timeout, - self, - g_direct_equal, - flash_done); + obt_main_loop_timeout_add(ob_main_loop, + G_USEC_PER_SEC * 0.6, + flash_timeout, + self, + g_direct_equal, + flash_done); g_get_current_time(&self->flash_end); g_time_val_add(&self->flash_end, G_USEC_PER_SEC * 5); @@ -1803,12 +1814,12 @@ void frame_begin_iconify_animation(ObFrame *self, gboolean iconifying) } if (new_anim) { - ob_main_loop_timeout_remove_data(ob_main_loop, frame_animate_iconify, - self, FALSE); - ob_main_loop_timeout_add(ob_main_loop, - FRAME_ANIMATE_ICONIFY_STEP_TIME, - frame_animate_iconify, self, - g_direct_equal, NULL); + obt_main_loop_timeout_remove_data(ob_main_loop, frame_animate_iconify, + self, FALSE); + obt_main_loop_timeout_add(ob_main_loop, + FRAME_ANIMATE_ICONIFY_STEP_TIME, + frame_animate_iconify, self, + g_direct_equal, NULL); /* do the first step */ frame_animate_iconify(self);