From 2814ee5d27df88a2521882e6e0f94cbeb539a5d7 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 24 Aug 2012 15:14:36 +0200 Subject: [PATCH 1/3] Port to new Clutter/Wayland API Signed-off-by: Daniel Stone --- mx/wayland/mx-window-wayland.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mx/wayland/mx-window-wayland.c b/mx/wayland/mx-window-wayland.c index 394f991b..0d0798c0 100644 --- a/mx/wayland/mx-window-wayland.c +++ b/mx/wayland/mx-window-wayland.c @@ -111,15 +111,14 @@ _resize_grip_button_press_event_cb (ClutterActor *actor, MxWindowWaylandPrivate *priv = window->priv; ClutterStage *stage = mx_window_get_clutter_stage (priv->window); struct wl_shell_surface *shell_surface; - struct wl_input_device *input_device; + struct wl_seat *seat; shell_surface = clutter_wayland_stage_get_wl_shell_surface (stage); - input_device = - clutter_wayland_input_device_get_wl_input_device (event->button.device); + seat = clutter_wayland_input_device_get_wl_seat (event->button.device); wl_shell_surface_resize (shell_surface, - input_device, - event->button.time, + seat, + event->button.time, /* XXX serial! */ WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT); return FALSE; @@ -133,13 +132,13 @@ _toolbar_button_press_event_cb (ClutterActor *actor, MxWindowWaylandPrivate *priv = window->priv; ClutterStage *stage = mx_window_get_clutter_stage (priv->window); struct wl_shell_surface *shell_surface; - struct wl_input_device *input_device; + struct wl_seat *seat; shell_surface = clutter_wayland_stage_get_wl_shell_surface (stage); - input_device = - clutter_wayland_input_device_get_wl_input_device (event->button.device); + seat = clutter_wayland_input_device_get_wl_seat (event->button.device); - wl_shell_surface_move (shell_surface, input_device, event->button.time); + /* XXX serial! */ + wl_shell_surface_move (shell_surface, seat, event->button.time); return FALSE; } From 2c13748da72e354a9a67140f86c928241fcc22ce Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sun, 26 Aug 2012 19:10:09 -0700 Subject: [PATCH 2/3] Default theme: Add window close icon from GTK+ Signed-off-by: Daniel Stone --- data/default-style.gresource.xml | 1 + data/style/default.css | 1 + data/style/window-close.png | Bin 0 -> 1981 bytes 3 files changed, 2 insertions(+) create mode 100644 data/style/window-close.png diff --git a/data/default-style.gresource.xml b/data/default-style.gresource.xml index 9c189170..4c3310bb 100644 --- a/data/default-style.gresource.xml +++ b/data/default-style.gresource.xml @@ -120,5 +120,6 @@ style/toggle-handle.png style/toolbar-background.png style/tooltip-background.png + style/window-close.png diff --git a/data/style/default.css b/data/style/default.css index 821afad3..bdd51c00 100644 --- a/data/style/default.css +++ b/data/style/default.css @@ -397,6 +397,7 @@ MxToolbar { } MxToolbar MxButton#close-button { + background-image: url('window-close.png'); -mx-icon-name: window-close; -mx-icon-size: 16; padding: 5 7 7 7; diff --git a/data/style/window-close.png b/data/style/window-close.png new file mode 100644 index 0000000000000000000000000000000000000000..fdf3eba2b13d2a1750d7fddab9d50bb1df0e1648 GIT binary patch literal 1981 zcmV;u2SWIXP)WAmF2-#?xS0hCx}x9S=kT4b z;FWT8Thb;^dfJ}v{hsIj-tYb1_cV+#7WRKeSV%xfKuADHKuExI7a)osZPjWs-w^~M zLMb9Dy=u2gr`j7978d@@1PHo}4@JH3V@~d|+5E!1DUGQ13Zjs=EaE!VTcS?${jr=Z zZ{dmjX;H8JlRg_17eL;AQ=g@sYH4j|!=r<2cw~@ucDFN3N%> zHp~VF``ExhFFSR*$SdkKXB8Eo(`&vlSsLzxbVXGetE?_(O-?%-93EgNiVD11oyNFS z@;W^^q^*g0dR?r}SS{H#TN_w^e=pN#i+`o2rmj^?0ENyCcTX3qsjKu0sH!nAdy`dK zjgyiHpR#mO(f!Hh(O551VA3wCQCg-XiQ9uv7(|A$RyT4@<;&KFV;qrUjW9! z1~zhMcLz4_G^Ojq&+H(RMby?+%^_q!1SCKn*A`m?d9jsUo1CDPIN{Zb!jMGX)y_u7 zhFGJ+;unB15Ya>AvA^`$x+Reh`Xv5GMD-j(282Kc)_R>(O5h|0Nke6sMA{Ed9yJtz z(D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] Remove padding specifiers for close button All these seemed to do was to make it expand on hover, and be unclickably small otherwise. Signed-off-by: Daniel Stone --- data/style/default.css | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/data/style/default.css b/data/style/default.css index bdd51c00..c10b299a 100644 --- a/data/style/default.css +++ b/data/style/default.css @@ -400,16 +400,6 @@ MxToolbar MxButton#close-button { background-image: url('window-close.png'); -mx-icon-name: window-close; -mx-icon-size: 16; - padding: 5 7 7 7; -} - -MxToolbar MxButton#close-button:hover { - -mx-icon-size: 16; -} - -MxToolbar MxButton#close-button:active { - -mx-icon-size: 16; - padding: 5 7; } MxSlider {