From 1d2d1f220c2e45a7b85a52e8fe890de072d36abb Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sun, 22 Apr 2007 14:46:30 +0000 Subject: [PATCH] remove the dock --- Makefile.am | 2 -- openbox/action.c | 10 +++++----- openbox/action.h | 2 +- openbox/client.c | 4 ++-- openbox/config.c | 13 +++++++------ openbox/config.h | 24 ++++++++++++------------ openbox/event.c | 22 +++++++++++----------- openbox/openbox.c | 8 ++++---- openbox/screen.c | 20 ++++++++++---------- openbox/window.c | 22 +++++++++++----------- openbox/window.h | 4 ++-- 11 files changed, 65 insertions(+), 66 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5d463728..961f037f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -147,8 +147,6 @@ openbox_openbox_SOURCES = \ openbox/config.h \ openbox/debug.c \ openbox/debug.h \ - openbox/dock.c \ - openbox/dock.h \ openbox/event.c \ openbox/event.h \ openbox/extensions.c \ diff --git a/openbox/action.c b/openbox/action.c index fc6f5a78..155132f7 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -30,7 +30,7 @@ #include "grab.h" #include "keyboard.h" #include "event.h" -#include "dock.h" +//#include "dock.h" #include "config.h" #include "mainloop.h" #include "startupnotify.h" @@ -736,11 +736,11 @@ ActionString actionstrings[] = action_moveresize, setup_action_resize }, - { +/* { "toggledockautohide", action_toggle_dockautohide, NULL - }, + },*/ { "toggleshowdesktop", action_toggle_show_desktop, @@ -1771,11 +1771,11 @@ void action_toggle_layer(union ActionData *data) client_action_end(data); } -void action_toggle_dockautohide(union ActionData *data) +/*void action_toggle_dockautohide(union ActionData *data) { config_dock_hide = !config_dock_hide; dock_configure(); -} +}*/ void action_toggle_show_desktop(union ActionData *data) { diff --git a/openbox/action.h b/openbox/action.h index b1bc081f..ccb88a6e 100644 --- a/openbox/action.h +++ b/openbox/action.h @@ -332,7 +332,7 @@ void action_send_to_layer(union ActionData *data); /* Layer */ void action_toggle_layer(union ActionData *data); /* Any */ -void action_toggle_dockautohide(union ActionData *data); +//void action_toggle_dockautohide(union ActionData *data); /* Any */ void action_toggle_show_desktop(union ActionData *data); /* Any */ diff --git a/openbox/client.c b/openbox/client.c index e7af5701..4f88cde5 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -20,7 +20,7 @@ #include "client.h" #include "debug.h" #include "startupnotify.h" -#include "dock.h" +//#include "dock.h" #include "xerror.h" #include "screen.h" #include "moveresize.h" @@ -243,7 +243,7 @@ void client_manage(Window window) if ((wmhint->flags & StateHint) && wmhint->initial_state == WithdrawnState) { - dock_add(window, wmhint); + //dock_add(window, wmhint); grab_server(FALSE); XFree(wmhint); return; diff --git a/openbox/config.c b/openbox/config.c index d406f8f1..583ae108 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -55,7 +55,7 @@ gboolean config_resize_four_corners; gint config_resize_popup_show; gint config_resize_popup_pos; -ObStackingLayer config_dock_layer; +/*ObStackingLayer config_dock_layer; gboolean config_dock_floating; gboolean config_dock_nostrut; ObDirection config_dock_pos; @@ -67,7 +67,7 @@ guint config_dock_hide_delay; guint config_dock_show_delay; guint config_dock_app_move_button; guint config_dock_app_move_modifiers; - +*/ guint config_keyboard_reset_keycode; guint config_keyboard_reset_state; @@ -554,7 +554,7 @@ static void parse_resize(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, } } -static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, +/*static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, gpointer d) { xmlNodePtr n; @@ -629,7 +629,7 @@ static void parse_dock(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, } g_free(str); } -} +}*/ static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, gpointer d) @@ -814,6 +814,7 @@ void config_startup(ObParseInst *i) parse_register(i, "resize", parse_resize, NULL); + /* config_dock_layer = OB_STACKING_LAYER_ABOVE; config_dock_pos = OB_DIRECTION_NORTHEAST; config_dock_floating = FALSE; @@ -824,10 +825,10 @@ void config_startup(ObParseInst *i) config_dock_hide = FALSE; config_dock_hide_delay = 300; config_dock_show_delay = 300; - config_dock_app_move_button = 2; /* middle */ + config_dock_app_move_button = 2; // middle config_dock_app_move_modifiers = 0; - parse_register(i, "dock", parse_dock, NULL); +*/ translate_key("C-g", &config_keyboard_reset_state, &config_keyboard_reset_keycode); diff --git a/openbox/config.h b/openbox/config.h index 851a68ed..6acccd79 100644 --- a/openbox/config.h +++ b/openbox/config.h @@ -56,31 +56,31 @@ extern gint config_resize_popup_show; extern gint config_resize_popup_pos; /*! The stacking layer the dock will reside in */ -extern ObStackingLayer config_dock_layer; +//extern ObStackingLayer config_dock_layer; /*! Is the dock floating */ -extern gboolean config_dock_floating; +//extern gboolean config_dock_floating; /*! Don't use a strut for the dock */ -extern gboolean config_dock_nostrut; +//extern gboolean config_dock_nostrut; /*! Where to place the dock if not floating */ -extern ObDirection config_dock_pos; +//extern ObDirection config_dock_pos; /*! If config_dock_floating, this is the top-left corner's position */ -extern gint config_dock_x; +//extern gint config_dock_x; /*! If config_dock_floating, this is the top-left corner's position */ -extern gint config_dock_y; +//extern gint config_dock_y; /*! Whether the dock places the dockapps in it horizontally or vertically */ -extern ObOrientation config_dock_orient; +//extern ObOrientation config_dock_orient; /*! Whether to auto-hide the dock when the pointer is not over it */ -extern gboolean config_dock_hide; +//extern gboolean config_dock_hide; /*! The number of microseconds to wait before hiding the dock */ -extern guint config_dock_hide_delay; +//extern guint config_dock_hide_delay; /*! The number of microseconds to wait before showing the dock */ -extern guint config_dock_show_delay; +//extern guint config_dock_show_delay; /*! The mouse button to be used to move dock apps */ -extern guint config_dock_app_move_button; +//extern guint config_dock_app_move_button; /*! The modifiers to be used with the button to move dock apps */ -extern guint config_dock_app_move_modifiers; +//extern guint config_dock_app_move_modifiers; /*! The name of the theme */ extern gchar *config_theme; diff --git a/openbox/event.c b/openbox/event.c index 871b158a..91575b1e 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -21,7 +21,7 @@ #include "debug.h" #include "window.h" #include "openbox.h" -#include "dock.h" +//#include "dock.h" #include "client.h" #include "xerror.h" #include "prop.h" @@ -74,8 +74,8 @@ static void event_process(const XEvent *e, gpointer data); static void event_client_dest(ObClient *client, gpointer data); static void event_handle_root(XEvent *e); static void event_handle_menu(XEvent *e); -static void event_handle_dock(ObDock *s, XEvent *e); -static void event_handle_dockapp(ObDockApp *app, XEvent *e); +//static void event_handle_dock(ObDock *s, XEvent *e); +//static void event_handle_dockapp(ObDockApp *app, XEvent *e); static void event_handle_client(ObClient *c, XEvent *e); static void event_handle_group(ObGroup *g, XEvent *e); @@ -410,8 +410,8 @@ static void event_process(const XEvent *ec, gpointer data) Window window; ObGroup *group = NULL; ObClient *client = NULL; - ObDock *dock = NULL; - ObDockApp *dockapp = NULL; +// ObDock *dock = NULL; + // ObDockApp *dockapp = NULL; ObWindow *obwin = NULL; XEvent ee, *e; ObEventData *ed = data; @@ -425,12 +425,12 @@ static void event_process(const XEvent *ec, gpointer data) (group = g_hash_table_lookup(group_map, &window)))) if ((obwin = g_hash_table_lookup(window_map, &window))) { switch (obwin->type) { - case Window_Dock: +/* case Window_Dock: dock = WINDOW_AS_DOCK(obwin); break; case Window_DockApp: dockapp = WINDOW_AS_DOCKAPP(obwin); - break; + break;*/ case Window_Client: client = WINDOW_AS_CLIENT(obwin); break; @@ -537,10 +537,10 @@ static void event_process(const XEvent *ec, gpointer data) event_handle_group(group, e); else if (client) event_handle_client(client, e); - else if (dockapp) +/* else if (dockapp) event_handle_dockapp(dockapp, e); else if (dock) - event_handle_dock(dock, e); + event_handle_dock(dock, e);*/ else if (window == RootWindow(ob_display, ob_screen)) event_handle_root(e); else if (e->type == MapRequest) @@ -1203,7 +1203,7 @@ static void event_handle_client(ObClient *client, XEvent *e) } } -static void event_handle_dock(ObDock *s, XEvent *e) +/*static void event_handle_dock(ObDock *s, XEvent *e) { switch (e->type) { case ButtonPress: @@ -1244,7 +1244,7 @@ static void event_handle_dockapp(ObDockApp *app, XEvent *e) dock_app_configure(app, e->xconfigure.width, e->xconfigure.height); break; } -} +}*/ ObMenuFrame* find_active_menu() { diff --git a/openbox/openbox.c b/openbox/openbox.c index 4ad1c70a..a853880e 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -20,7 +20,7 @@ #include "debug.h" #include "openbox.h" #include "session.h" -#include "dock.h" +//#include "dock.h" #include "event.h" #include "menu.h" #include "client.h" @@ -271,7 +271,7 @@ gint main(gint argc, gchar **argv) grab_startup(reconfigure); group_startup(reconfigure); client_startup(reconfigure); - dock_startup(reconfigure); + //dock_startup(reconfigure); moveresize_startup(reconfigure); keyboard_startup(reconfigure); mouse_startup(reconfigure); @@ -302,7 +302,7 @@ gint main(gint argc, gchar **argv) state = OB_STATE_EXITING; if (!reconfigure) { - dock_remove_all(); + //dock_remove_all(); client_unmanage_all(); } @@ -311,7 +311,7 @@ gint main(gint argc, gchar **argv) mouse_shutdown(reconfigure); keyboard_shutdown(reconfigure); moveresize_shutdown(reconfigure); - dock_shutdown(reconfigure); + //dock_shutdown(reconfigure); client_shutdown(reconfigure); group_shutdown(reconfigure); grab_shutdown(reconfigure); diff --git a/openbox/screen.c b/openbox/screen.c index 2d34f263..327762df 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -19,7 +19,7 @@ #include "debug.h" #include "openbox.h" -#include "dock.h" +//#include "dock.h" #include "xerror.h" #include "prop.h" #include "grab.h" @@ -372,7 +372,7 @@ void screen_resize() return; screen_update_areas(); - dock_configure(); +// dock_configure(); for (it = client_list; it; it = g_list_next(it)) client_move_onscreen(it->data, FALSE); @@ -1044,11 +1044,11 @@ void screen_update_areas() o + c->strut.left - area[i][x].x, &struts[x]); } - screen_area_add_strut_left(&dock_strut, +/* screen_area_add_strut_left(&dock_strut, &monitor_area[x], o + dock_strut.left - area[i][x].x, &struts[x]); - +*/ area[i][x].x += struts[x].left; area[i][x].width -= struts[x].left; } @@ -1066,11 +1066,11 @@ void screen_update_areas() o + c->strut.top - area[i][x].y, &struts[x]); } - screen_area_add_strut_top(&dock_strut, +/* screen_area_add_strut_top(&dock_strut, &monitor_area[x], o + dock_strut.top - area[i][x].y, &struts[x]); - +*/ area[i][x].y += struts[x].top; area[i][x].height -= struts[x].top; } @@ -1090,13 +1090,13 @@ void screen_update_areas() (o - c->strut.right), &struts[x]); } - screen_area_add_strut_right(&dock_strut, +/* screen_area_add_strut_right(&dock_strut, &monitor_area[x], (area[i][x].x + area[i][x].width - 1) - (o - dock_strut.right), &struts[x]); - +*/ area[i][x].width -= struts[x].right; } @@ -1115,13 +1115,13 @@ void screen_update_areas() (o - c->strut.bottom), &struts[x]); } - screen_area_add_strut_bottom(&dock_strut, +/* screen_area_add_strut_bottom(&dock_strut, &monitor_area[x], (area[i][x].y + area[i][x].height - 1) - \ (o - dock_strut.bottom), &struts[x]); - +*/ area[i][x].height -= struts[x].bottom; } diff --git a/openbox/window.c b/openbox/window.c index 7b3428bd..386297a8 100644 --- a/openbox/window.c +++ b/openbox/window.c @@ -19,7 +19,7 @@ #include "window.h" #include "menuframe.h" #include "config.h" -#include "dock.h" +//#include "dock.h" #include "client.h" #include "frame.h" @@ -44,12 +44,12 @@ Window window_top(ObWindow *self) switch (self->type) { case Window_Menu: return ((ObMenuFrame*)self)->window; - case Window_Dock: - return ((ObDock*)self)->frame; - case Window_DockApp: +// case Window_Dock: +// return ((ObDock*)self)->frame; +// case Window_DockApp: /* not to be used for stacking */ - g_assert_not_reached(); - break; +// g_assert_not_reached(); +// break; case Window_Client: return ((ObClient*)self)->frame->window; case Window_Internal: @@ -64,12 +64,12 @@ Window window_layer(ObWindow *self) switch (self->type) { case Window_Menu: return OB_STACKING_LAYER_INTERNAL; - case Window_Dock: - return config_dock_layer; - case Window_DockApp: +// case Window_Dock: +// return config_dock_layer; +// case Window_DockApp: /* not to be used for stacking */ - g_assert_not_reached(); - break; +// g_assert_not_reached(); +// break; case Window_Client: return ((ObClient*)self)->layer; case Window_Internal: diff --git a/openbox/window.h b/openbox/window.h index ef29edd7..f9ca1849 100644 --- a/openbox/window.h +++ b/openbox/window.h @@ -63,8 +63,8 @@ struct _ObClient; #define WINDOW_AS_INTERNAL(win) ((struct InternalWindow*)win) #define MENU_AS_WINDOW(menu) ((ObWindow*)menu) -#define DOCK_AS_WINDOW(dock) ((ObWindow*)dock) -#define DOCKAPP_AS_WINDOW(dockapp) ((ObWindow*)dockapp) +//#define DOCK_AS_WINDOW(dock) ((ObWindow*)dock) +//#define DOCKAPP_AS_WINDOW(dockapp) ((ObWindow*)dockapp) #define CLIENT_AS_WINDOW(client) ((ObWindow*)client) #define INTERNAL_AS_WINDOW(intern) ((ObWindow*)intern) -- 2.39.2