Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home: Allow to tweak long-press unfold delay #9

Open
wants to merge 14 commits into
base: feature/trixie/droidian-experiments
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/icons/input-powerbar-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion data/sm.puri.phosh.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@
UI elements in order to not overlap with notches and cutouts.
</description>
</key>

<key name="osk-unfold-delay" type="d">
<default>1.0</default>
<summary>OSK unfold long press delay factor</summary>
<description>
Delay factor for long press on the home bar to unfold the keyboard.
Valid values are [0.5,2.0]. Values less than 1.0 make the unfold trigger
sooner, greater than 1.0 make the unfold trigger later.
</description>
</key>

</schema>

<schema id="sm.puri.phosh.emergency-calls"
Expand All @@ -98,7 +109,7 @@
<summary>Whether to scramble the keypad</summary>
<description>
Setting this to true shuffle the digits on the PIN keypad to
make eaveysdropping harder.
make eavesdropping harder.
</description>
</key>
</schema>
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Build-Depends:
libadwaita-1-dev,
libcallaudio-dev,
libevince-dev,
libgirepository1.0-dev,
libjson-glib-dev,
libsecret-1-dev,
libsystemd-dev,
Expand Down
14 changes: 7 additions & 7 deletions src/background-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ static PhoshBackground *
create_background_for_monitor (PhoshBackgroundManager *self, PhoshMonitor *monitor)
{
PhoshWayland *wl = phosh_wayland_get_default();
PhoshBackground *background;
GtkWidget *background;

background = g_object_ref_sink(PHOSH_BACKGROUND (phosh_background_new (
phosh_wayland_get_zwlr_layer_shell_v1(wl),
monitor->wl_output,
MAX(1.0, phosh_monitor_get_fractional_scale (monitor)),
monitor == self->primary_monitor)));
background = phosh_background_new (phosh_wayland_get_zwlr_layer_shell_v1 (wl),
monitor->wl_output,
MAX(1.0, phosh_monitor_get_fractional_scale (monitor)),
monitor == self->primary_monitor,
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND);
g_hash_table_insert (self->backgrounds,
g_object_ref (monitor),
background);
return background;
return PHOSH_BACKGROUND (background);
}


Expand Down
9 changes: 7 additions & 2 deletions src/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ background_update (PhoshBackground *self, GdkPixbuf *pixbuf, GDesktopBackgroundS

g_clear_object (&self->pixbuf);

#if 0
if (self->primary)
phosh_shell_get_usable_area (phosh_shell_get_default (), NULL, NULL, &width, &height);
else
#endif
g_object_get (self, "configured-width", &width, "configured-height", &height, NULL);

g_debug ("Scaling %p to %dx%d, scale %f", self, width, height, self->scale);
Expand Down Expand Up @@ -466,8 +468,10 @@ background_draw_cb (PhoshBackground *self,

g_return_val_if_fail (GDK_IS_PIXBUF (self->pixbuf), TRUE);

#if 0
if (self->primary)
phosh_shell_get_usable_area (phosh_shell_get_default (), &x, &y, NULL, NULL);
#endif

cairo_save(cr);
cairo_scale(cr, 1.0 / self->scale, 1.0 / self->scale);
Expand Down Expand Up @@ -626,7 +630,8 @@ GtkWidget *
phosh_background_new (gpointer layer_shell,
gpointer wl_output,
float scale,
gboolean primary)
gboolean primary,
guint layer)
{
return g_object_new (PHOSH_TYPE_BACKGROUND,
"layer-shell", layer_shell,
Expand All @@ -635,7 +640,7 @@ phosh_background_new (gpointer layer_shell,
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT |
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT),
"layer", ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND,
"layer", layer,
"kbd-interactivity", FALSE,
"exclusive-zone", -1,
"namespace", "phosh background",
Expand Down
3 changes: 2 additions & 1 deletion src/background.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ G_DECLARE_FINAL_TYPE (PhoshBackground, phosh_background, PHOSH, BACKGROUND, Phos
GtkWidget *phosh_background_new (gpointer layer_shell,
gpointer wl_output,
float scale,
gboolean primary);
gboolean primary,
guint layer);
void phosh_background_set_primary (PhoshBackground *self, gboolean primary);
void phosh_background_set_scale (PhoshBackground *self, float scale);
Loading