Skip to content

Commit

Permalink
Merges the toolkit branch. Breaks some of the minor functionality, bu…
Browse files Browse the repository at this point in the history
…t moves forward again.
  • Loading branch information
phkaeser committed Jan 12, 2024
2 parents 2757c53 + 63cac02 commit c830c57
Show file tree
Hide file tree
Showing 121 changed files with 14,338 additions and 4,117 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ PKG_CHECK_MODULES(XKBCOMMON REQUIRED IMPORTED_TARGET xkbcommon>=1.0.3) # 1.4.1)
# Configuration. Remove CMakeCache.txt to rerun...
OPTION(config_DEBUG "Include debugging information" ON)
OPTION(config_OPTIM "Optimizations" OFF)
OPTION(config_DOXYGEN_CRITICAL "Whether to fail on doxygen warnings" OFF)

# Toplevel compile options, for GCC.
IF(CMAKE_C_COMPILER_ID STREQUAL "GNU")
Expand Down Expand Up @@ -79,7 +80,6 @@ ADD_SUBDIRECTORY(icons)
ADD_SUBDIRECTORY(protocols)
ADD_SUBDIRECTORY(third_party/protocols)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(src/decorations)
ADD_SUBDIRECTORY(src/toolkit)

# Adds submodules last, to permit checking on already-existing targets.
Expand Down
2 changes: 1 addition & 1 deletion dependencies/drm
Submodule drm updated from 98e1db to a0b011
2 changes: 1 addition & 1 deletion dependencies/hwdata
Submodule hwdata updated 8 files
+1 −1 Makefile
+17 −2 hwdata.spec
+10,974 −10,974 iab.txt
+100,956 −96,750 oui.txt
+690 −121 pci.ids
+12 −0 pnp.ids
+9 −9 pnp.ids.patch
+4 −2 usb.ids
2 changes: 1 addition & 1 deletion dependencies/libdisplay-info
Submodule libdisplay-info updated from 49af17 to ae6cb5
2 changes: 1 addition & 1 deletion dependencies/pixman
Submodule pixman updated from e4c878 to b4b789
2 changes: 1 addition & 1 deletion dependencies/seatd
Submodule seatd updated from 1bd042 to 0746ed
2 changes: 1 addition & 1 deletion dependencies/wayland
Submodule wayland updated from 4a7348 to 50ea9c
2 changes: 1 addition & 1 deletion dependencies/wayland-protocols
Submodule wayland-protocols updated from bbe929 to 87e0ce
2 changes: 1 addition & 1 deletion dependencies/wlroots
Submodule wlroots updated from fffa19 to 5de9e1
24 changes: 24 additions & 0 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,30 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)

FIND_FILE(PLANTUML_JAR
NAMES plantuml.jar
HINTS ENV{PLANTUML_JAR_PATH}
PATHS
/usr/global/share/java/plantuml/
/usr/local/share/java/plantuml/
/usr/share/java/
/usr/local/share/java/
/usr/share/plantuml/)
IF(PLANTUML_JAR)
SET(DOXYGEN_PLANTUML_JAR_FILE ${PLANTUML_JAR})
ELSE()
SET(DOXYGEN_PLANTUML_JAR_FILE "")
MESSAGE(
NOTICE
"Did not find plantuml.jar -- Will not generate class diagrams.")
ENDIF(PLANTUML_JAR_FOUND)

IF(config_DOXYGEN_CRITICAL)
SET(DOXYGEN_WARN_AS_ERROR "YES")
ELSE(config_DOXYGEN_CRITICAL)
SET(DOXYGEN_WARN_AS_ERROR "NO")
ENDIF(config_DOXYGEN_CRITICAL)

# set input and output files
SET(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
SET(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
Expand Down
5 changes: 2 additions & 3 deletions doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ WARN_NO_PARAMDOC = NO
# Possible values are: NO, YES and FAIL_ON_WARNINGS.
# The default value is: NO.

WARN_AS_ERROR = YES
WARN_AS_ERROR = @DOXYGEN_WARN_AS_ERROR@

# The WARN_FORMAT tag determines the format of the warning messages that doxygen
# can produce. The string should contain the $file, $line, and $text tags, which
Expand Down Expand Up @@ -857,7 +857,6 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.

INPUT = @PROJECT_SOURCE_DIR@/src \
@PROJECT_SOURCE_DIR@/src/decorations \
@PROJECT_SOURCE_DIR@/src/toolkit \
@PROJECT_SOURCE_DIR@/apps/ \
@PROJECT_SOURCE_DIR@/apps/libwlclient
Expand Down Expand Up @@ -2542,7 +2541,7 @@ DIAFILE_DIRS =
# generate a warning when it encounters a \startuml command in this case and
# will not generate output for the diagram.

PLANTUML_JAR_PATH =
PLANTUML_JAR_PATH = @DOXYGEN_PLANTUML_JAR_FILE@

# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
Expand Down
66 changes: 66 additions & 0 deletions doc/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ Support for visual effects to improve usability, but not for pure show.

## Plan for 0.2

* Issues to fix:
* [done] Fix out-of-sync display of server-side decoration and window content when resizing.
* Fix assertion crash when mouse is pressed, then moved to another toplevel, then released.
* Hide window border when not having server-side decoration.
* Fix issue with Chrome: Enabling "Use system title and boders" will pick a slightly small decoration.
* Fix issue on resizing: When moving the mouse too quickly, focus is lost and the resizing stops.
* Fix issue on fullscreen: The window border is kept, having the window off by 1 pixel.

* Experimental support for Dock Apps
* [done] Experimental wayland protocol for Apps to declare icon surfaces.
* Surfaces will be shown in either tile container, clip or dock area,
Expand All @@ -76,10 +84,66 @@ Support for visual effects to improve usability, but not for pure show.

* Configurable keyboard map (in code or commandline arg)

* Support `xdg_shell`, based on toolkit.
* [done] XDG Popups.
* [done] Move and Resize, compliant with asynchronous ops.
* [done] Maximize.
* [done] Set title.
* [done] fullscreen.
* minimize.
* show window menu.
* set_parent.
* set app ID.

* Support `layer_shell`, based on toolkit.

* Support window decoration protocol, based on toolkit.
* [done] Style of title bar, iconify and close buttons similar to Window Maker.
* Window menu, with basic window actions (not required to adapt to state).

* Multiple workspaces, based on toolkit.
* Navigate via keys (ctrl-window-alt-arrows, hardcoded).

* Dock, visible across workspaces, based on toolkit.
* Style similar to Window Maker.
* With application launchers (hardcoded).

* Clip, based on toolkit.
* Display the current workspace.
* Buttons to switch between workspaces.

* Application launchers, based on toolkit.
* Display an icon.
* Display application status (*starting*, *running*).
* Configurable (in code).

* Window actions, based on toolkit.
* Move ([done] drag via title bar, or [pending] window-alt-click)
* [done] Resize windows, including a resize bar.
* [done] Fullscreen windows.
* [done] Maximize windows.
* Minimize (*iconify*) windows.
* Roll up (*shade*) windows.
* Raise window when activated.

* Visualization of iconified applications, based on toolkit.

* Task list (window-alt-esc), cycling through windows, based on toolkit.

### Internals and code organization

* [done] Design a toolkit and re-factor the codebase to make use of it.
* Ensure the main features (eg. all explicit actions and features above) are
tested.

## Pending

Features for further versions, not ordered by priority nor timeline.

* Wayland protocol adherence.
* Support XDG `wm_capabilities` and advertise the compositor features.
* Fullscreen: Hide all other visuals when a window takes fullscreen.

* XWayland support (X11 clients).

* Dock Apps.
Expand All @@ -100,6 +164,8 @@ Features for further versions, not ordered by priority nor timeline.
* Determine how to detect client preferences.
* Configurable and overridable (titlebar, resizebar, buttons, ...).
* Scaling factor per application.
* Build and test a clear model for `organic`/`maximized`/`fullscreen` state
switches and precedence.

* Application support.
* Icons retrieved and used for iconified windows. See [themes](https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html).
Expand Down
18 changes: 8 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ SET(SOURCES
menu.c
menu_item.c
output.c
resizebar.c
server.c
subprocess_monitor.c
task_list.c
tile.c
tile_container.c
titlebar.c
util.c
view.c
wlmtk_xdg_popup.c
wlmtk_xdg_toplevel.c
workspace.c
xdg_decoration.c
xdg_popup.c
Expand All @@ -66,15 +65,14 @@ SET(HEADERS
menu.h
menu_item.h
output.h
resizebar.h
server.h
subprocess_monitor.h
task_list.h
tile_container.h
tile.h
titlebar.h
util.h
view.h
wlmtk_xdg_popup.h
wlmtk_xdg_toplevel.h
workspace.h
xdg_decoration.h
xdg_popup.h
Expand All @@ -83,7 +81,7 @@ SET(HEADERS
)

ADD_EXECUTABLE(wlmaker wlmaker.c ${SOURCES} ${HEADERS})
ADD_DEPENDENCIES(wlmaker protocol_headers decorations toolkit)
ADD_DEPENDENCIES(wlmaker protocol_headers toolkit)

TARGET_COMPILE_DEFINITIONS(
wlmaker PRIVATE WLMAKER_ICON_DATA_DIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/wlmaker")
Expand All @@ -110,7 +108,7 @@ TARGET_INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(
wlmaker PRIVATE
base
decorations
toolkit
wlmaker_protocols
PkgConfig::CAIRO
PkgConfig::LIBDRM
Expand All @@ -121,7 +119,7 @@ TARGET_LINK_LIBRARIES(
)

ADD_EXECUTABLE(wlmaker_test wlmaker_test.c ${SOURCES} ${HEADERS})
ADD_DEPENDENCIES(wlmaker_test protocol_headers decorations toolkit)
ADD_DEPENDENCIES(wlmaker_test protocol_headers toolkit)
TARGET_INCLUDE_DIRECTORIES(
wlmaker_test PRIVATE
${PROJECT_BINARY_DIR}/third_party/protocols
Expand All @@ -137,7 +135,7 @@ TARGET_INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(
wlmaker_test PRIVATE
base
decorations
toolkit
wlmaker_protocols
PkgConfig::CAIRO
PkgConfig::LIBDRM
Expand Down
8 changes: 4 additions & 4 deletions src/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#define WLR_USE_UNSTABLE
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_cursor.h>
#undef WLR_USE_UNSTABLE

/* == Definitions ========================================================== */
Expand Down Expand Up @@ -215,10 +215,10 @@ void _button_enter(wlmaker_interactive_t *interactive_ptr)
wlmaker_button_t *button_ptr = button_from_interactive(interactive_ptr);
if (button_ptr->activated) button_press(button_ptr, true);

wlr_xcursor_manager_set_cursor_image(
wlr_cursor_set_xcursor(
interactive_ptr->cursor_ptr->wlr_cursor_ptr,
interactive_ptr->cursor_ptr->wlr_xcursor_manager_ptr,
"left_ptr",
interactive_ptr->cursor_ptr->wlr_cursor_ptr);
"left_ptr");
}

/* ------------------------------------------------------------------------- */
Expand Down
4 changes: 2 additions & 2 deletions src/clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "button.h"
#include "config.h"
#include "decorations.h"
#include "util.h"
#include "toolkit/toolkit.h"

/* == Declarations ========================================================= */

Expand Down Expand Up @@ -250,7 +250,7 @@ wlmaker_clip_t *wlmaker_clip_create(
clip_ptr->view.anchor =
WLMAKER_VIEW_ANCHOR_BOTTOM | WLMAKER_VIEW_ANCHOR_RIGHT;

wlm_util_connect_listener_signal(
wlmtk_util_connect_listener_signal(
&server_ptr->workspace_changed,
&clip_ptr->workspace_changed_listener,
handle_workspace_changed);
Expand Down
26 changes: 6 additions & 20 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,50 +72,36 @@ const wlmaker_config_theme_t wlmaker_config_theme = {
.window_margin_color = 0xff000000, // Pich black, opaque.
.window_margin_width = 1,

.titlebar_focussed_fill = {
.type = WLMAKER_STYLE_COLOR_HGRADIENT,
.param = { .hgradient = { .from = 0xff505a5e,.to = 0xff202a2e }}
},
.titlebar_focussed_text_color = 0xffffffff,
.titlebar_blurred_fill = {
.type = WLMAKER_STYLE_COLOR_HGRADIENT,
.param = { .hgradient = { .from = 0xffc2c0c5,.to = 0xff828085 }}
},
.titlebar_blurred_text_color = 0xff000000,
.resizebar_fill = {
.type = WLMAKER_STYLE_COLOR_SOLID,
.param = { .solid = { .color = 0xffc2c0c5 }}
},
.tile_fill = {
.type = WLMAKER_STYLE_COLOR_DGRADIENT,
.type = WLMTK_STYLE_COLOR_DGRADIENT,
.param = { .hgradient = { .from = 0xffa6a6b6,.to = 0xff515561 }}
},
.iconified_title_fill = {
.type = WLMAKER_STYLE_COLOR_SOLID,
.type = WLMTK_STYLE_COLOR_SOLID,
.param = { .solid = { .color = 0xff404040 }}
},
.iconified_title_color = 0xffffffff, // White.
.menu_fill = {
.type = WLMAKER_STYLE_COLOR_HGRADIENT,
.type = WLMTK_STYLE_COLOR_HGRADIENT,
.param = { .hgradient = { .from = 0xffc2c0c5, .to = 0xff828085 }}
},
.menu_margin_color = 0xff000000, // Pitch black, opaque.
.menu_margin_width = 1,
.menu_padding_width = 1,

.menu_item_enabled_fill = {
.type = WLMAKER_STYLE_COLOR_SOLID,
.type = WLMTK_STYLE_COLOR_SOLID,
.param = { .solid = { .color = 0x00000000 }} // Transparent.
},
.menu_item_enabled_text_color = 0xff000000, // Black, opaque.
.menu_item_selected_fill = {
.type = WLMAKER_STYLE_COLOR_SOLID,
.type = WLMTK_STYLE_COLOR_SOLID,
.param = { .solid = { .color = 0xffffffff }} // White, opaque..
},
.menu_item_selected_text_color = 0xff000000, // Black, opaque.

.task_list_fill = {
.type = WLMAKER_STYLE_COLOR_SOLID,
.type = WLMTK_STYLE_COLOR_SOLID,
.param.solid.color = 0xc0202020 // Dark grey, partly transparent.
},
.task_list_text_color = 0xffffffff,
Expand Down
Loading

0 comments on commit c830c57

Please sign in to comment.